From 40b31335ce8aa31d1d4f816c8cb779a0e868e304 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 4 Jun 2014 16:50:48 +0200 Subject: [PATCH] Fix return value of project explorers macro expanders They would claim that a variable that has an empty value is not a valid variable and should not be replaced with that empty value. Change-Id: I5ee9b950b611f8878efe2f86ac5b219d51194d48 Reviewed-by: Daniel Teske --- src/plugins/projectexplorer/buildconfiguration.cpp | 5 +++-- .../projectexplorer/localapplicationrunconfiguration.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp index 3ecfb78e2ad..e4d4bc5485b 100644 --- a/src/plugins/projectexplorer/buildconfiguration.cpp +++ b/src/plugins/projectexplorer/buildconfiguration.cpp @@ -72,8 +72,9 @@ bool BuildConfigMacroExpander::resolveMacro(const QString &name, QString *ret) *ret = m_bc->buildDirectory().toUserOutput(); return true; } - *ret = Core::VariableManager::value(name.toUtf8()); - return !ret->isEmpty(); + bool found; + *ret = Core::VariableManager::value(name.toUtf8(), &found); + return found; } } // namespace Internal diff --git a/src/plugins/projectexplorer/localapplicationrunconfiguration.cpp b/src/plugins/projectexplorer/localapplicationrunconfiguration.cpp index 18aca44940d..e1230f0dc72 100644 --- a/src/plugins/projectexplorer/localapplicationrunconfiguration.cpp +++ b/src/plugins/projectexplorer/localapplicationrunconfiguration.cpp @@ -55,8 +55,9 @@ bool FallBackMacroExpander::resolveMacro(const QString &name, QString *ret) *ret = m_target->project()->projectDirectory().toUserOutput(); return true; } - *ret = Core::VariableManager::value(name.toUtf8()); - return !ret->isEmpty(); + bool found; + *ret = Core::VariableManager::value(name.toUtf8(), &found); + return found; } } // namespace Internal