Register QT_LIBEXEC_PATH variables

Task-number: QTBUG-88791
Change-Id: I6f83836bab624f2281fd1a62970234713074f8a9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Kai Köhne
2021-03-09 11:29:23 +01:00
committed by Kai Koehne
parent f9cfc0bde9
commit 9b3de8dd70
2 changed files with 32 additions and 0 deletions

View File

@@ -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(

View File

@@ -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();
}