[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdelibs/frameworks] staging/kde4support/autotests: Adapt for recent QUrl changes: path() is decoded
From:       David Faure <faure () kde ! org>
Date:       2013-08-31 7:24:29
Message-ID: E1VFfXp-0008L8-0e () scm ! kde ! org
[Download RAW message or body]

Git commit c12db596be7ab0bcd5108ee55b11428d5a062e8f by David Faure.
Committed on 31/08/2013 at 07:29.
Pushed by dfaure into branch 'frameworks'.

Adapt for recent QUrl changes: path() is decoded again. Phew!

M  +4    -5    staging/kde4support/autotests/kurltest.cpp

http://commits.kde.org/kdelibs/c12db596be7ab0bcd5108ee55b11428d5a062e8f

diff --git a/staging/kde4support/autotests/kurltest.cpp \
b/staging/kde4support/autotests/kurltest.cpp index 242d9ad..9061109 100644
--- a/staging/kde4support/autotests/kurltest.cpp
+++ b/staging/kde4support/autotests/kurltest.cpp
@@ -664,9 +664,8 @@ void KUrlTest::testSetFileName() // and addPath
   QCOMPARE( u2.url(), QString("http://www.kde.org/subdir") ); // unchanged
 
   QUrl qurl2 = QUrl::fromEncoded( \
                "print:/specials/Print%20To%20File%20(PDF%252FAcrobat)", \
                QUrl::TolerantMode );
-  // Note the behavior change: Qt4's path() is now path(QUrl::FullyDecoded)
-  QCOMPARE(qurl2.path(), QString::fromLatin1("/specials/Print To File \
                (PDF%252FAcrobat)"));
-  QCOMPARE(qurl2.path(QUrl::FullyDecoded), QString::fromLatin1("/specials/Print To \
File (PDF%2FAcrobat)")); +  QCOMPARE(qurl2.path(), \
QString::fromLatin1("/specials/Print To File (PDF%2FAcrobat)")); +  \
QCOMPARE(qurl2.path(QUrl::PrettyDecoded), QString::fromLatin1("/specials/Print To \
File (PDF%252FAcrobat)"));  QCOMPARE(qurl2.toString(), \
QString::fromLatin1("print:/specials/Print To File (PDF%252FAcrobat)"));  QCOMPARE( \
qurl2.toEncoded(), QByteArray("print:/specials/Print%20To%20File%20(PDF%252FAcrobat)") \
);  
@@ -1700,8 +1699,8 @@ void KUrlTest::testMailto()
       QUrl mailtoUrl;
       mailtoUrl.setScheme("mailto");
       mailtoUrl.setPath("a%b");
-      QCOMPARE(mailtoUrl.path(), QString("a%25b")); // The path is encoded in Qt5...
-      QCOMPARE(mailtoUrl.path(QUrl::FullyDecoded), QString("a%b"));
+      QCOMPARE(mailtoUrl.path(), QString("a%b"));
+      QCOMPARE(mailtoUrl.path(QUrl::FullyEncoded), QString("a%25b"));
       QCOMPARE(mailtoUrl.toString(), QString("mailto:a%25b"));
       QCOMPARE(QString::fromLatin1(mailtoUrl.toEncoded()), \
QString::fromLatin1("mailto:a%25b"));  }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic