summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2021-04-27 15:21:32 +0200
committerhjk <hjk@qt.io>2021-04-28 13:19:22 +0000
commit38bbdb78417f5931a47e7265fe75f63406e030bc (patch)
tree68708f3542bd25c22827862e78a65de9abbd2a44
parent794babeb2cfcba6d1589f9b8efed0082eec9db57 (diff)
downloadqt-creator-38bbdb78417f5931a47e7265fe75f63406e030bc.tar.gz
Utils: Make MacroExpander work with remote file names
Change-Id: I2c71c9f7c6ac3523f640e3c57267090444032973 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r--src/libs/utils/macroexpander.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libs/utils/macroexpander.cpp b/src/libs/utils/macroexpander.cpp
index 958fe656b8..74edbcd9af 100644
--- a/src/libs/utils/macroexpander.cpp
+++ b/src/libs/utils/macroexpander.cpp
@@ -292,6 +292,11 @@ QString MacroExpander::expand(const QString &stringWithVariables) const
FilePath MacroExpander::expand(const FilePath &fileNameWithVariables) const
{
+ if (fileNameWithVariables.needsDevice()) {
+ QUrl url = fileNameWithVariables.toUrl();
+ url.setPath(expand(url.path()));
+ return FilePath::fromUrl(url);
+ }
return FilePath::fromString(expand(fileNameWithVariables.toString()));
}