forked from qt-creator/qt-creator
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:
@@ -1485,6 +1485,13 @@ BaseQtVersion::createMacroExpander(const std::function<const BaseQtVersion *()>
|
|||||||
return version->hostPrefixPath().toString();
|
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(
|
expander->registerVariable(
|
||||||
"Qt:QT_INSTALL_HEADERS",
|
"Qt:QT_INSTALL_HEADERS",
|
||||||
QtKitAspect::tr("The installation location of the current Qt version's header files."),
|
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."),
|
QtKitAspect::tr("The installation location of the current Qt version's executable files."),
|
||||||
versionProperty([](const BaseQtVersion *version) { return version->binPath().toString(); }));
|
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
|
expander
|
||||||
->registerVariable("Qt:QT_INSTALL_PLUGINS",
|
->registerVariable("Qt:QT_INSTALL_PLUGINS",
|
||||||
QtKitAspect::tr(
|
QtKitAspect::tr(
|
||||||
|
@@ -159,6 +159,15 @@ void QtSupportPlugin::extensionsInitialized()
|
|||||||
return qt ? qt->binPath().toUserOutput() : QString();
|
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 * {
|
static const auto activeQtVersion = []() -> const BaseQtVersion * {
|
||||||
ProjectExplorer::Project *project = SessionManager::startupProject();
|
ProjectExplorer::Project *project = SessionManager::startupProject();
|
||||||
if (!project || !project->activeTarget())
|
if (!project || !project->activeTarget())
|
||||||
@@ -185,6 +194,15 @@ void QtSupportPlugin::extensionsInitialized()
|
|||||||
return qt ? qt->binPath().toUserOutput() : QString();
|
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();
|
askAboutQtInstallation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user