From 6c1ac1bd5366a07081c3d71129e01631b1860f60 Mon Sep 17 00:00:00 2001 From: Akhilesh Nema Date: Fri, 15 Jan 2016 09:33:04 +0100 Subject: [PATCH] GUI: Add detection for geany and Qtcreator as editor application --- gui/applicationlist.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gui/applicationlist.cpp b/gui/applicationlist.cpp index 3524ad687..30bc52f7d 100644 --- a/gui/applicationlist.cpp +++ b/gui/applicationlist.cpp @@ -66,6 +66,8 @@ bool ApplicationList::LoadSettings() AddApplication(app); defapp = 0; } + CheckAndAddApplication("/usr/bin/geany","geany","+(line) (file)"); + CheckAndAddApplication("/usr/bin/qtcreator","Qt Creator","-client (file):(line)"); // use as default for kde environments if (QFileInfo("/usr/bin/kate").isExecutable()) { Application app; @@ -219,5 +221,12 @@ bool ApplicationList::FindDefaultWindowsEditor() if (CheckAndAddApplication(windowsPath + "\\system32\\notepad.exe", "Notepad", "(file)")) foundOne = true; + QString regPath = "HKEY_CLASSES_ROOT\\Applications\\QtProject.QtCreator.pro\\shell\\Open\\command"; + QSettings registry(regPath, QSettings::NativeFormat); + QString qtCreatorRegistry = registry.value("Default", QString()).toString(); + QString qtCreatorPath = qtCreatorRegistry.left(qtCreatorRegistry.indexOf(".exe") + 4); + if (!qtCreatorRegistry.isEmpty() && CheckAndAddApplication(qtCreatorPath, "Qt Creator", "-client (file):(line)")) { + foundOne = true; + } return foundOne; }