summaryrefslogtreecommitdiffstats
path: root/qmake/library
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2019-02-05 10:45:38 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2019-02-13 14:15:10 +0000
commit4b4a288f5f88077d647d47e9bdd911edf6cdca72 (patch)
tree9985ee49bb48943ce662ba1576041d13de779ba4 /qmake/library
parenta2c9f9433a772c03e6aaf820910487d794280c3a (diff)
Recognize UNC paths as absolute (i.e. not relative)
IoUtils::isRelativePath() didn't attempt to consider UNC paths, due to a belief that qmake fails on them so badly that it wasn't worth the extra code. However, it turns out Qt Creator's copy of this code does need to take this into account, so start the change off in qmake's version so as to keep in sync. Task-number: QTCREATORBUG-21881 Change-Id: I3084b87c1d3ca6508255e94e04ac8db3ceaebb7e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake/library')
-rw-r--r--qmake/library/ioutils.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/qmake/library/ioutils.cpp b/qmake/library/ioutils.cpp
index 2b2c6d0078..3e49a99cd5 100644
--- a/qmake/library/ioutils.cpp
+++ b/qmake/library/ioutils.cpp
@@ -77,7 +77,12 @@ bool IoUtils::isRelativePath(const QString &path)
&& (path.at(2) == QLatin1Char('/') || path.at(2) == QLatin1Char('\\'))) {
return false;
}
- // (... unless, of course, they're UNC, which qmake fails on anyway)
+ // ... unless, of course, they're UNC:
+ if (path.length() >= 2
+ && (path.at(0).unicode() == '\\' || path.at(0).unicode() == '/')
+ && path.at(1) == path.at(0)) {
+ return false;
+ }
#else
if (path.startsWith(QLatin1Char('/')))
return false;