summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2016-07-31 21:44:09 +0200
committerDavid Faure <david.faure@kdab.com>2016-07-31 20:28:18 +0000
commit074571305e45d30066b199641eb5d0866e3b0a92 (patch)
tree108731e7766b40059dce2b6a4612a2cc944cf1cc
parentc0b6fbcadbefcc8a91e5db7fd98662dddcd7a0f8 (diff)
downloadqtxmlpatterns-074571305e45d30066b199641eb5d0866e3b0a92.tar.gz
xmlpatterns: don't use fromLocalFile() on relative pathsv5.6.25.6.2
Creating a URL like "file:fileToOpen=globals.gccxml" makes no sense, and breaks QUrl::resolved since qtbase commit 8a33077. Change-Id: Icab4fac92db2e7c3d922f548462c3345b8addd83 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--tools/xmlpatterns/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/xmlpatterns/main.cpp b/tools/xmlpatterns/main.cpp
index 00d41b3..788bb02 100644
--- a/tools/xmlpatterns/main.cpp
+++ b/tools/xmlpatterns/main.cpp
@@ -213,7 +213,7 @@ static inline QUrl finalizeURI(const QApplicationArgumentParser &parser,
{
const QString stringURI(parser.value(arg).toString());
- if(parser.has(isURI))
+ if (parser.has(isURI) || QDir::isRelativePath(stringURI))
userURI = QUrl(stringURI);
else
userURI = QUrl::fromLocalFile(stringURI);