aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2021-03-09 11:29:23 +0100
committerKai Koehne <kai.koehne@qt.io>2021-03-23 16:47:07 +0000
commit9b3de8dd70444fc5a742ab6926ed38064c944224 (patch)
tree8a4a7d8a1e7f6cb30cabb79e5584f78ca9c7e643
parentf9cfc0bde9c9b8f370b492937ae1ff92bfa27427 (diff)
Register QT_LIBEXEC_PATH variables
Task-number: QTBUG-88791 Change-Id: I6f83836bab624f2281fd1a62970234713074f8a9 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r--src/plugins/qtsupport/baseqtversion.cpp14
-rw-r--r--src/plugins/qtsupport/qtsupportplugin.cpp18
2 files changed, 32 insertions, 0 deletions
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp
index 92802e2e42..7b3fd99d11 100644
--- a/src/plugins/qtsupport/baseqtversion.cpp
+++ b/src/plugins/qtsupport/baseqtversion.cpp
@@ -1485,6 +1485,13 @@ BaseQtVersion::createMacroExpander(const std::function<const BaseQtVersion *()>
return version->hostPrefixPath().toString();
}));
+ expander->registerVariable("Qt:QT_HOST_LIBEXECS",
+ QtKitAspect::tr("The installation location of the current Qt "
+ "version's internal host executable files."),
+ versionProperty([](const BaseQtVersion *version) {
+ return version->hostLibexecPath().toString();
+ }));
+
expander->registerVariable(
"Qt:QT_INSTALL_HEADERS",
QtKitAspect::tr("The installation location of the current Qt version's header files."),
@@ -1509,6 +1516,13 @@ BaseQtVersion::createMacroExpander(const std::function<const BaseQtVersion *()>
QtKitAspect::tr("The installation location of the current Qt version's executable files."),
versionProperty([](const BaseQtVersion *version) { return version->binPath().toString(); }));
+ expander->registerVariable(
+ "Qt:QT_INSTALL_LIBEXECS",
+ QtKitAspect::tr(
+ "The installation location of the current Qt version's internal executable files."),
+ versionProperty(
+ [](const BaseQtVersion *version) { return version->libExecPath().toString(); }));
+
expander
->registerVariable("Qt:QT_INSTALL_PLUGINS",
QtKitAspect::tr(
diff --git a/src/plugins/qtsupport/qtsupportplugin.cpp b/src/plugins/qtsupport/qtsupportplugin.cpp
index af27b73886..464768d916 100644
--- a/src/plugins/qtsupport/qtsupportplugin.cpp
+++ b/src/plugins/qtsupport/qtsupportplugin.cpp
@@ -159,6 +159,15 @@ void QtSupportPlugin::extensionsInitialized()
return qt ? qt->binPath().toUserOutput() : QString();
});
+ expander->registerVariable(
+ "CurrentDocument:Project:QT_HOST_LIBEXECS",
+ tr("Full path to the host libexec directory of the Qt version in the active kit "
+ "of the project containing the current document."),
+ []() {
+ const BaseQtVersion *const qt = currentQtVersion();
+ return qt ? qt->hostLibexecPath().toUserOutput() : QString();
+ });
+
static const auto activeQtVersion = []() -> const BaseQtVersion * {
ProjectExplorer::Project *project = SessionManager::startupProject();
if (!project || !project->activeTarget())
@@ -185,6 +194,15 @@ void QtSupportPlugin::extensionsInitialized()
return qt ? qt->binPath().toUserOutput() : QString();
});
+ expander->registerVariable(
+ "ActiveProject::QT_HOST_LIBEXECS",
+ tr("Full path to the libexec bin directory of the Qt version in the active kit "
+ "of the active project."),
+ []() {
+ const BaseQtVersion *const qt = activeQtVersion();
+ return qt ? qt->hostLibexecPath().toUserOutput() : QString();
+ });
+
askAboutQtInstallation();
}