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 <daniel.teske@digia.com>
This commit is contained in:
Eike Ziller
2014-06-04 16:50:48 +02:00
parent 9e39fa7ab4
commit 40b31335ce
2 changed files with 6 additions and 4 deletions

View File

@@ -72,8 +72,9 @@ bool BuildConfigMacroExpander::resolveMacro(const QString &name, QString *ret)
*ret = m_bc->buildDirectory().toUserOutput(); *ret = m_bc->buildDirectory().toUserOutput();
return true; return true;
} }
*ret = Core::VariableManager::value(name.toUtf8()); bool found;
return !ret->isEmpty(); *ret = Core::VariableManager::value(name.toUtf8(), &found);
return found;
} }
} // namespace Internal } // namespace Internal

View File

@@ -55,8 +55,9 @@ bool FallBackMacroExpander::resolveMacro(const QString &name, QString *ret)
*ret = m_target->project()->projectDirectory().toUserOutput(); *ret = m_target->project()->projectDirectory().toUserOutput();
return true; return true;
} }
*ret = Core::VariableManager::value(name.toUtf8()); bool found;
return !ret->isEmpty(); *ret = Core::VariableManager::value(name.toUtf8(), &found);
return found;
} }
} // namespace Internal } // namespace Internal