diff options
author | David Faure <faure@kde.org> | 2012-02-01 12:06:18 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-02 06:57:25 +0100 |
commit | 42db8b2df643ca46b5c096f8e0951ef158a9c687 (patch) | |
tree | 4fb0b14d2e89bc33e1a7c896c9c5af0dfe7a8c2d /src/xmlpatterns/data/qanyuri.cpp | |
parent | f42f82f435d738339ad85c1380d1167338517247 (diff) | |
download | qtxmlpatterns-42db8b2df643ca46b5c096f8e0951ef158a9c687.tar.gz |
Fix QUrl handling after QUrl changes.
toString() is fine for most usages but here the result is made part of XML
bits, so toEncoded() is necessary so that '<' and '>' are percent-encoded.
Change-Id: I41832cefe3ae12cab13531f17095d0804a2e86d9
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'src/xmlpatterns/data/qanyuri.cpp')
-rw-r--r-- | src/xmlpatterns/data/qanyuri.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xmlpatterns/data/qanyuri.cpp b/src/xmlpatterns/data/qanyuri.cpp index 5d82baf..4a51364 100644 --- a/src/xmlpatterns/data/qanyuri.cpp +++ b/src/xmlpatterns/data/qanyuri.cpp @@ -60,14 +60,15 @@ AnyURI::Ptr AnyURI::fromValue(const QString &value) AnyURI::Ptr AnyURI::fromValue(const QUrl &uri) { - return AnyURI::Ptr(new AnyURI(uri.toString())); + return AnyURI::Ptr(new AnyURI(QString::fromLatin1(uri.toEncoded()))); } AnyURI::Ptr AnyURI::resolveURI(const QString &relative, const QString &base) { const QUrl urlBase(base); - return AnyURI::fromValue(urlBase.resolved(relative).toString()); + const QUrl uri(urlBase.resolved(relative)); + return AnyURI::fromValue(uri); } ItemType::Ptr AnyURI::type() const |