forked from qt-creator/qt-creator
ProjectExplorer: Rename RunConfiguration:Name -> CurrentRun:Name
Similar variables don't contain "Configuration" in their names. For example: CurrentBuild:Name. + make it available globally. Change-Id: Ie094e2f7afc449d678cf0afec1548350f03ead77 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
1d0e1633c2
commit
3805512156
@@ -1352,6 +1352,15 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
||||
return bc ? bc->displayName() : QString();
|
||||
});
|
||||
|
||||
expander->registerVariable(Constants::VAR_CURRENTRUN_NAME,
|
||||
tr("The currently active run configuration's name."),
|
||||
[this]() -> QString {
|
||||
if (Target *target = activeTarget()) {
|
||||
if (RunConfiguration *rc = target->activeRunConfiguration())
|
||||
return rc->displayName();
|
||||
}
|
||||
return QString();
|
||||
});
|
||||
|
||||
expander->registerVariable(Constants::VAR_CURRENTBUILD_TYPE,
|
||||
tr("The currently active build configuration's type."),
|
||||
|
||||
@@ -236,6 +236,7 @@ const char VAR_CURRENTKIT_FILESYSTEMNAME[] = "CurrentKit:FileSystemName";
|
||||
const char VAR_CURRENTKIT_ID[] = "CurrentKit:Id";
|
||||
const char VAR_CURRENTBUILD_NAME[] = "CurrentBuild:Name";
|
||||
const char VAR_CURRENTBUILD_TYPE[] = "CurrentBuild:Type";
|
||||
const char VAR_CURRENTRUN_NAME[] = "CurrentRun:Name";
|
||||
const char VAR_CURRENTDEVICE_HOSTADDRESS[] = "CurrentDevice:HostAddress";
|
||||
const char VAR_CURRENTDEVICE_SSHPORT[] = "CurrentDevice:SshPort";
|
||||
const char VAR_CURRENTDEVICE_USERNAME[] = "CurrentDevice:UserName";
|
||||
|
||||
@@ -256,9 +256,9 @@ void RunConfiguration::ctor()
|
||||
BuildConfiguration *bc = target()->activeBuildConfiguration();
|
||||
return bc ? bc->macroExpander() : target()->macroExpander();
|
||||
});
|
||||
expander->registerVariable("RunConfiguration:Name",
|
||||
QCoreApplication::translate("ProjectExplorer", "Name of run configuration"),
|
||||
[this] { return displayName(); });
|
||||
expander->registerVariable(Constants::VAR_CURRENTRUN_NAME,
|
||||
QCoreApplication::translate("ProjectExplorer", "The currently active run configuration's name."),
|
||||
[this] { return displayName(); }, false);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user