summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2016-10-29 16:39:24 (GMT)
committerAlbert Astals Cid <aacid@kde.org>2016-10-29 16:39:50 (GMT)
commitaa38e8d1b78f2de63c317040151640ec514660df (patch)
tree4ecf6a86ece216b116ae5678009cb16c65456c25
parent6007168aa0f6bae49679e1d84d22519972ae435a (diff)
Fix xps url resolving porting regression
-rw-r--r--generators/xps/generator_xps.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/generators/xps/generator_xps.cpp b/generators/xps/generator_xps.cpp
index 7bafbc3..c15da17 100644
--- a/generators/xps/generator_xps.cpp
+++ b/generators/xps/generator_xps.cpp
@@ -473,7 +473,9 @@ static QString absolutePath( const QString &path, const QString &location )
// already absolute
retPath = location;
} else {
- retPath = QUrl::fromLocalFile(path + QLatin1Char('/') + location).toDisplayString(QUrl::PreferLocalFile);
+ QUrl u = QUrl::fromLocalFile(path);
+ QUrl u2 = QUrl::fromLocalFile(location);
+ retPath = u.resolved(u2).toDisplayString(QUrl::PreferLocalFile);
}
// it seems paths & file names can also be percent-encoded
// (XPS won't ever finish surprising me)