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();
|
*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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user