Commit 40b31335 authored by Eike Ziller's avatar Eike Ziller

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: default avatarDaniel Teske <daniel.teske@digia.com>
parent 9e39fa7a
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment