Skip to content

Commit

Permalink
add vscode applications to the predefined IDEs for "Open in Editor" (#…
Browse files Browse the repository at this point in the history
…606)

* added vscodium
* have both vscode applications also available on Windows + MacOS
  • Loading branch information
GitMensch committed Mar 4, 2024
1 parent 271a781 commit 6f9f958
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,17 @@ struct IdeSettings
};

const IdeSettings ideSettings[] = {
#if defined(Q_OS_WIN) || defined(Q_OS_OSX)
{"", "", "", "", ""} // Dummy content, because we can't have empty arrays.
#else
#if !defined(Q_OS_WIN) && !defined(Q_OS_OSX)
{"kdevelop", "%f:%l:%c", QT_TRANSLATE_NOOP("MainWindow", "KDevelop"), "org.kde.kdevelop"},
{"kate", "%f --line %l --column %c", QT_TRANSLATE_NOOP("MainWindow", "Kate"), "org.kde.kate"},
{"kwrite", "%f --line %l --column %c", QT_TRANSLATE_NOOP("MainWindow", "KWrite"), "org.kde.kwrite"},
{"gedit", "%f +%l:%c", QT_TRANSLATE_NOOP("MainWindow", "gedit"), "org.gnome.gedit"},
{"gvim", "%f +%l", QT_TRANSLATE_NOOP("MainWindow", "gvim"), "gvim"},
{"qtcreator", "-client %f:%l", QT_TRANSLATE_NOOP("MainWindow", "Qt Creator"), "org.qt-project.qtcreator"},
{"code", "-g %f:%l:%c", QT_TRANSLATE_NOOP("MainWindow", "Visual Studio Code"), "code"},
#endif
};
#if defined(Q_OS_WIN) \
|| defined(Q_OS_OSX) // Remove this #if branch when adding real data to ideSettings for Windows/OSX.
static const int ideSettingsSize = 0;
#else
{"code", "-g %f:%l:%c", QT_TRANSLATE_NOOP("MainWindow", "Visual Studio Code"), "code"},
{"codium", "-g %f:%l:%c", QT_TRANSLATE_NOOP("MainWindow", "VSCodium"), "codium"}};
const int ideSettingsSize = sizeof(ideSettings) / sizeof(IdeSettings);
#endif

bool isAppAvailable(const char* app)
{
Expand Down

0 comments on commit 6f9f958

Please sign in to comment.