forked from qt-creator/qt-creator
Utils: Expand FilePaths per part, not as a full string
Avoid the potential side effects from the toString/fromUserInput round trip. Fixes: QTCREATORBUG-31259 Change-Id: Id004d71079b4ef8ac26b927921c5cd7a23531110 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -274,7 +274,10 @@ QString MacroExpander::expand(const QString &stringWithVariables) const
|
||||
FilePath MacroExpander::expand(const FilePath &fileNameWithVariables) const
|
||||
{
|
||||
// We want single variables to expand to fully qualified strings.
|
||||
return FilePath::fromUserInput(expand(fileNameWithVariables.toString()));
|
||||
const QString host = expand(fileNameWithVariables.host().toString());
|
||||
const QString scheme = expand(fileNameWithVariables.scheme().toString());
|
||||
const QString path = expand(fileNameWithVariables.path());
|
||||
return FilePath::fromParts(scheme, host, path);
|
||||
}
|
||||
|
||||
QByteArray MacroExpander::expand(const QByteArray &stringWithVariables) const
|
||||
|
Reference in New Issue
Block a user