From 57826bcab6c96f7b4e5e6a862ff3ccc31c03fd64 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Fri, 31 May 2024 16:08:14 +0200 Subject: [PATCH] Core: Add IDE:Executable variable Change-Id: Ic191562bbfea0b3f0998c0e71c11d7316644937c Reviewed-by: Eike Ziller --- src/plugins/coreplugin/coreplugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/coreplugin/coreplugin.cpp b/src/plugins/coreplugin/coreplugin.cpp index dd99f474503..0777bd20422 100644 --- a/src/plugins/coreplugin/coreplugin.cpp +++ b/src/plugins/coreplugin/coreplugin.cpp @@ -251,6 +251,9 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage) expander->registerVariable("HostOs:ExecutableSuffix", Tr::tr("The platform executable suffix."), [] { return QString(Utils::HostOsInfo::withExecutableSuffix("")); }); + expander->registerFileVariables("IDE:Executable", + Tr::tr("The path to the running %1 itself.").arg(QGuiApplication::applicationDisplayName()), + []() { return FilePath::fromUserInput(QCoreApplication::applicationFilePath()); }); expander->registerVariable("IDE:ResourcePath", Tr::tr("The directory where %1 finds its pre-installed resources.") .arg(QGuiApplication::applicationDisplayName()),