Skip to content

Commit 6c1ac1b

Browse files
nemaakhileshdanmar
authored andcommitted
GUI: Add detection for geany and Qtcreator as editor application
1 parent 966d078 commit 6c1ac1b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

gui/applicationlist.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ bool ApplicationList::LoadSettings()
6666
AddApplication(app);
6767
defapp = 0;
6868
}
69+
CheckAndAddApplication("/usr/bin/geany","geany","+(line) (file)");
70+
CheckAndAddApplication("/usr/bin/qtcreator","Qt Creator","-client (file):(line)");
6971
// use as default for kde environments
7072
if (QFileInfo("/usr/bin/kate").isExecutable()) {
7173
Application app;
@@ -219,5 +221,12 @@ bool ApplicationList::FindDefaultWindowsEditor()
219221
if (CheckAndAddApplication(windowsPath + "\\system32\\notepad.exe", "Notepad", "(file)"))
220222
foundOne = true;
221223

224+
QString regPath = "HKEY_CLASSES_ROOT\\Applications\\QtProject.QtCreator.pro\\shell\\Open\\command";
225+
QSettings registry(regPath, QSettings::NativeFormat);
226+
QString qtCreatorRegistry = registry.value("Default", QString()).toString();
227+
QString qtCreatorPath = qtCreatorRegistry.left(qtCreatorRegistry.indexOf(".exe") + 4);
228+
if (!qtCreatorRegistry.isEmpty() && CheckAndAddApplication(qtCreatorPath, "Qt Creator", "-client (file):(line)")) {
229+
foundOne = true;
230+
}
222231
return foundOne;
223232
}

0 commit comments

Comments
 (0)