", description);
d->m_prefixMap.insert(tmp, value);
}
diff --git a/src/libs/utils/macroexpander.h b/src/libs/utils/macroexpander.h
index 70448069c51..e0a330956c9 100644
--- a/src/libs/utils/macroexpander.h
+++ b/src/libs/utils/macroexpander.h
@@ -68,7 +68,7 @@ public:
using IntFunction = std::function;
void registerPrefix(const QByteArray &prefix,
- const QString &description, const PrefixFunction &value);
+ const QString &description, const PrefixFunction &value, bool visible = true);
void registerVariable(const QByteArray &variable,
const QString &description, const StringFunction &value,
diff --git a/src/plugins/coreplugin/locator/executefilter.cpp b/src/plugins/coreplugin/locator/executefilter.cpp
index b827b601910..c08a568ac3b 100644
--- a/src/plugins/coreplugin/locator/executefilter.cpp
+++ b/src/plugins/coreplugin/locator/executefilter.cpp
@@ -97,7 +97,7 @@ void ExecuteFilter::accept(LocatorFilterEntry selection,
bool found;
QString workingDirectory = Utils::globalMacroExpander()->value("CurrentDocument:Path", &found);
if (!found || workingDirectory.isEmpty())
- workingDirectory = Utils::globalMacroExpander()->value("CurrentProject:Path", &found);
+ workingDirectory = Utils::globalMacroExpander()->value("CurrentDocument:Project:Path", &found);
ExecuteData d;
d.workingDirectory = workingDirectory;
diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp
index df9ecce5e01..c54e6bc5f7b 100644
--- a/src/plugins/projectexplorer/buildconfiguration.cpp
+++ b/src/plugins/projectexplorer/buildconfiguration.cpp
@@ -172,11 +172,18 @@ BuildConfiguration::BuildConfiguration(Target *target, Utils::Id id)
expander->registerVariable("buildDir", tr("Build directory"),
[this] { return buildDirectory().toUserOutput(); });
+ // TODO: Remove "Current" variants in ~4.16.
expander->registerVariable(Constants::VAR_CURRENTBUILD_NAME, tr("Name of current build"),
[this] { return displayName(); }, false);
+ expander->registerVariable("BuildConfig:Name", tr("Name of the build configuration"),
+ [this] { return displayName(); });
+
expander->registerPrefix(Constants::VAR_CURRENTBUILD_ENV,
tr("Variables in the current build environment"),
+ [this](const QString &var) { return environment().expandedValueForKey(var); }, false);
+ expander->registerPrefix("BuildConfig:Env",
+ tr("Variables in the build configuration's environment"),
[this](const QString &var) { return environment().expandedValueForKey(var); });
updateCacheAndEmitEnvironmentChanged();
diff --git a/src/plugins/projectexplorer/kit.cpp b/src/plugins/projectexplorer/kit.cpp
index 949b3c480ef..2fad1bf4032 100644
--- a/src/plugins/projectexplorer/kit.cpp
+++ b/src/plugins/projectexplorer/kit.cpp
@@ -98,20 +98,30 @@ public:
for (KitAspect *aspect : KitManager::kitAspects())
aspect->addToMacroExpander(kit, &m_macroExpander);
- // This provides the same global fall back as the global expander
- // without relying on the currentKit() discovery process there.
- m_macroExpander.registerVariable(Constants::VAR_CURRENTKIT_NAME,
+ // TODO: Remove the "Current" variants in ~4.16
+ m_macroExpander.registerVariable("CurrentKit:Name",
tr("The name of the currently active kit."),
[kit] { return kit->displayName(); },
false);
- m_macroExpander.registerVariable(Constants::VAR_CURRENTKIT_FILESYSTEMNAME,
+ m_macroExpander.registerVariable("Kit:Name",
+ tr("The name of the kit."),
+ [kit] { return kit->displayName(); });
+
+ m_macroExpander.registerVariable("CurrentKit:FileSystemName",
tr("The name of the currently active kit in a filesystem-friendly version."),
[kit] { return kit->fileSystemFriendlyName(); },
false);
- m_macroExpander.registerVariable(Constants::VAR_CURRENTKIT_ID,
+ m_macroExpander.registerVariable("Kit:FileSystemName",
+ tr("The name of the kit in a filesystem-friendly version."),
+ [kit] { return kit->fileSystemFriendlyName(); });
+
+ m_macroExpander.registerVariable("CurrentKit:Id",
tr("The id of the currently active kit."),
[kit] { return kit->id().toString(); },
false);
+ m_macroExpander.registerVariable("Kit:Id",
+ tr("The id of the kit."),
+ [kit] { return kit->id().toString(); });
}
DisplayName m_unexpandedDisplayName;
diff --git a/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp
index 24fb3857edb..caeed15cdf8 100644
--- a/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp
+++ b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp
@@ -84,7 +84,7 @@ KitManagerConfigWidget::KitManagerConfigWidget(Kit *k) :
tr("The name of the kit suitable for generating "
"directory names. This value is used for the variable %1, "
"which for example determines the name of the shadow build directory."
- "
").arg(QLatin1String(Constants::VAR_CURRENTKIT_FILESYSTEMNAME));
+ "