forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user