path: root/tests/manual
diff options
authorThiago Macieira <>2013-07-19 12:03:25 -0700
committerThe Qt Project <>2013-08-04 04:48:35 +0200
commitc615dcc44168d8e8e1e2134d69c3bd9607c603ea (patch)
treeb242307e5f7485443117b74df786fb4e4c6d4711 /tests/manual
parent7b964c77fa15fa3fbf18538ebcdf6b09ffbbbd0e (diff)
QUrl: do not decode "#" in fragments
For some time, we've assumed that the URL specification had a mistake in that it didn't allow the "#" character to appear decoded in the fragment. We've gotten away with it so far. However, turns out that the CoreFoundation NSURL class doesn't like it. So we have to be stricter. [ChangeLog][Important Behavior Changes][QUrl and QUrlQuery] QUrl no longer decodes %23 found in the fragment to "#" in the output of toString(QUrl::FullyEncoded) or toEncoded() Task-number: QTBUG-31945 Change-Id: If5e0fb37bae84710986c9ca89bd69ec98437cd63 Reviewed-by: David Faure (KDE) <>
Diffstat (limited to 'tests/manual')
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/manual/qdesktopservices/tst_qdesktopservices.cpp b/tests/manual/qdesktopservices/tst_qdesktopservices.cpp
index 534816a01b..9c39002fba 100644
--- a/tests/manual/qdesktopservices/tst_qdesktopservices.cpp
+++ b/tests/manual/qdesktopservices/tst_qdesktopservices.cpp
@@ -104,6 +104,11 @@ void tst_QDesktopServices::openUrl_data()
<< QUrl("")
<< "This should search \"/profile/5\" on Google.";
+ // see QTBUG-31945
+ QTest::newRow("two-fragments")
+ << QUrl("")
+ << "This should open \"Implementing a Container View Controller\" in the UIViewController docs";
<< QUrl("")
<< "This should open an email composer with the destination set to";
@@ -118,7 +123,7 @@ void tst_QDesktopServices::openUrl()
QFETCH(QUrl, data);
QFETCH(QString, message);
qWarning("\n\nOpening \"%s\": %s", qPrintable(data.toString()), qPrintable(message));
- QDesktopServices::openUrl(data);
+ QVERIFY(QDesktopServices::openUrl(data));