MacroExpander: Fall back to global expander

... and use that all over the place.

Change-Id: Ie6e0ed0f0d9eaba9b4466761e6b455f33a905086
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
hjk
2014-10-15 14:45:31 +02:00
parent 89602419c4
commit ef563d8085
30 changed files with 154 additions and 155 deletions

View File

@@ -221,9 +221,17 @@ QString MacroExpander::value(const QByteArray &variable, bool *found)
* \sa MacroExpander
* \sa macroExpander()
*/
QString MacroExpander::expandedString(const QString &stringWithVariables)
QString MacroExpander::expand(const QString &stringWithVariables)
{
return Utils::expandMacros(stringWithVariables, this);
QString res = Utils::expandMacros(stringWithVariables, this);
if (this != globalMacroExpander())
res = Utils::expandMacros(res, this);
return res;
}
QByteArray MacroExpander::expand(const QByteArray &stringWithVariables)
{
return expand(QString::fromLatin1(stringWithVariables)).toLatin1();
}
/*!