Skip to content

Commit 6c95779

Browse files
committed
Default editor (notepad.exe) on Windows
1 parent 007b5e8 commit 6c95779

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

qt-app/src/cmainwindow.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,13 @@ void CMainWindow::viewFile()
526526

527527
void CMainWindow::editFile()
528528
{
529-
QString editorPath = CSettings().value(KEY_EDITOR_PATH).toString();
529+
#ifdef _WIN32
530+
const QString defaultEditor = "notepad.exe";
531+
#else
532+
const QString defaultEditor;
533+
#endif
534+
535+
QString editorPath = CSettings().value(KEY_EDITOR_PATH, defaultEditor).toString();
530536
if (FileSystemHelpers::resolvePath(editorPath).isEmpty())
531537
{
532538
if (QMessageBox::question(this, tr("Editor not configured"), tr("No editor program has been configured (or the specified path doesn't exist). Do you want to specify the editor now?")) == QMessageBox::Yes)

0 commit comments

Comments
 (0)