forked from qt-creator/qt-creator
Utils: Fix expansion of macros in FilePath
In the New Project wizards, we do have e.g. %{ProFile} that should expand to {scheme}://{device}//{path-to-pro}, not to {}://{}//{schemedevicepath-to-pro} or similar. Task-number: QTCREATORBUG-28355 Change-Id: Idbad709f3fce583f21186a1d43f27ecac15be2ea Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -272,10 +272,8 @@ QString MacroExpander::expand(const QString &stringWithVariables) const
|
||||
|
||||
FilePath MacroExpander::expand(const FilePath &fileNameWithVariables) const
|
||||
{
|
||||
return FilePath::fromParts(
|
||||
expand(fileNameWithVariables.scheme().toString()),
|
||||
expand(fileNameWithVariables.host().toString()),
|
||||
expand(fileNameWithVariables.path()));
|
||||
// We want single variables to expand to fully qualified strings.
|
||||
return FilePath::fromString(expand(fileNameWithVariables.toString()));
|
||||
}
|
||||
|
||||
QByteArray MacroExpander::expand(const QByteArray &stringWithVariables) const
|
||||
|
Reference in New Issue
Block a user