GUI: Applicationlist: Add Microsoft Visual Studio Code (on Windows) (#1193)

This commit is contained in:
Sebastian 2018-04-26 16:26:10 +02:00 committed by GitHub
parent 55983e2a0b
commit b1bd6bb9ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -252,5 +252,15 @@ bool ApplicationList::findDefaultWindowsEditor()
} }
} }
const QString regPathMSVSCode = "HKEY_CLASSES_ROOT\\Applications\\Code.exe\\shell\\open\\command";
const QSettings registryMSVSCode(regPathMSVSCode, QSettings::NativeFormat);
const QString msvscodeRegistry = registryMSVSCode.value("Default", QString()).toString();
if (!msvscodeRegistry.isEmpty()) {
const QString msvscodePath = msvscodeRegistry.left(msvscodeRegistry.indexOf(".exe") + 4).replace("\"", "");
if (checkAndAddApplication(msvscodePath, "Microsoft VS Code", "-g (file):(line)")) {
foundOne = true;
}
}
return foundOne; return foundOne;
} }