forked from qt-creator/qt-creator
Add %{CurrentBuild:Env} to global environment
%{CurrentBuild:Name} and %{CurrentBuild:Type} are there too. Change-Id: I06b49da61cd689b54be87333d7fa3f212ebf1762 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -1497,6 +1497,13 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
return BuildConfiguration::buildTypeName(type);
|
return BuildConfiguration::buildTypeName(type);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
expander->registerPrefix(Constants::VAR_CURRENTBUILD_ENV,
|
||||||
|
BuildConfiguration::tr("Variables in the current build environment"),
|
||||||
|
[](const QString &var) {
|
||||||
|
if (BuildConfiguration *bc = activeBuildConfiguration())
|
||||||
|
return bc->environment().value(var);
|
||||||
|
return QString();
|
||||||
|
});
|
||||||
|
|
||||||
QString fileDescription = tr("File where current session is saved.");
|
QString fileDescription = tr("File where current session is saved.");
|
||||||
auto fileHandler = [] { return SessionManager::sessionNameToFileName(SessionManager::activeSession()).toString(); };
|
auto fileHandler = [] { return SessionManager::sessionNameToFileName(SessionManager::activeSession()).toString(); };
|
||||||
|
Reference in New Issue
Block a user