diff options
author | Martin Petersson <martin.petersson@nokia.com> | 2011-07-19 10:42:40 (GMT) |
---|---|---|
committer | Martin Petersson <martin.petersson@nokia.com> | 2011-07-19 10:42:40 (GMT) |
commit | 4082ed92ed80c57cb499de569631a664107ef05b (patch) | |
tree | 88151446e7e8d0a515733bdaf3c4a4d7312f6caa /tests/auto/qnetworkreply | |
parent | efde1f9521962398c156efd0b6670a358537ba51 (diff) | |
download | Qt-4082ed92ed80c57cb499de569631a664107ef05b.zip Qt-4082ed92ed80c57cb499de569631a664107ef05b.tar.gz Qt-4082ed92ed80c57cb499de569631a664107ef05b.tar.bz2 |
QNetworkAccessFileBackend: Add warning for file url without scheme.
When the scheme is not set for a file we should accept the url but
add a warning. The behaviour will change for Qt5 in which we should no
longer accept the url if the scheme is not set.
Task-number: QTBUG-17731
Reviewed-by: Markus Goetz
Diffstat (limited to 'tests/auto/qnetworkreply')
-rw-r--r-- | tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 45f501c..34b0375 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -1672,10 +1672,8 @@ void tst_QNetworkReply::getErrors() QFETCH(QString, url); QNetworkRequest request(url); -#if defined(Q_OS_WIN) || defined (Q_OS_SYMBIAN) if (qstrcmp(QTest::currentDataTag(), "empty-scheme-host") == 0 && QFileInfo(url).isAbsolute()) QTest::ignoreMessage(QtWarningMsg, "QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files"); -#endif QNetworkReplyPtr reply = manager.get(request); reply->setParent(this); // we have expect-fails @@ -1691,10 +1689,9 @@ void tst_QNetworkReply::getErrors() //qDebug() << reply->errorString(); QFETCH(int, error); -#if defined(Q_OS_WIN) || defined (Q_OS_SYMBIAN) if (QFileInfo(url).isAbsolute()) - QEXPECT_FAIL("empty-scheme-host", "this is expected to fail on Windows and Symbian, QTBUG-17731", Abort); -#endif + QEXPECT_FAIL("empty-scheme-host", "this is expected to fail, QTBUG-17731", Abort); + QEXPECT_FAIL("ftp-is-dir", "QFtp cannot provide enough detail", Abort); // the line below is not necessary QEXPECT_FAIL("ftp-dir-not-readable", "QFtp cannot provide enough detail", Abort); |