summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/io/qurl.cpp1
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp1
-rw-r--r--src/network/socket/qsymbiansocketengine.cpp6
-rw-r--r--src/network/socket/qsymbiansocketengine_p.h1
-rw-r--r--tests/auto/qnetworkreply/test/test.pro2
-rw-r--r--tests/auto/qtcpsocket/test/test.pro2
-rw-r--r--tests/auto/qurl/tst_qurl.cpp28
7 files changed, 32 insertions, 9 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 8813656..d551009 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -5466,6 +5466,7 @@ void QUrl::removeAllEncodedQueryItems(const QByteArray &key)
if (end < d->query.size())
++end; // remove additional '%'
d->query.remove(pos, end - pos);
+ query = d->query.constData(); //required if remove detach;
} else {
pos = end + 1;
}
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index 64a22aa..7d49648 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -653,6 +653,7 @@ void QNetworkAccessHttpBackend::postRequest()
delegate->isPipeliningUsed,
QSharedPointer<char>(),
delegate->incomingContentLength);
+ replyDownloadData(delegate->synchronousDownloadData);
httpError(delegate->incomingErrorCode, delegate->incomingErrorDetail);
} else {
replyDownloadMetaData
diff --git a/src/network/socket/qsymbiansocketengine.cpp b/src/network/socket/qsymbiansocketengine.cpp
index edd5d6e..0aa5a5a 100644
--- a/src/network/socket/qsymbiansocketengine.cpp
+++ b/src/network/socket/qsymbiansocketengine.cpp
@@ -1037,7 +1037,7 @@ qint64 QSymbianSocketEngine::write(const char *data, qint64 len)
TSockXfrLength sentBytes = 0;
TRequestStatus status;
d->nativeSocket.Send(buffer, 0, status, sentBytes);
- User::WaitForRequest(status); //TODO: on emulator this blocks for write >16kB (non blocking IO not implemented properly?)
+ User::WaitForRequest(status);
TInt err = status.Int();
if (err) {
@@ -1204,7 +1204,7 @@ int QSymbianSocketEnginePrivate::nativeSelect(int timeout, bool checkRead, bool
const_cast<QSymbianSocketEnginePrivate*>(this)->setError(err);
//restart asynchronous notifier (only one IOCTL allowed at a time)
if (asyncSelect)
- asyncSelect->IssueRequest(); //TODO: in error case should we restart or not?
+ asyncSelect->IssueRequest();
return err;
}
if (checkRead && (selectFlags() & KSockSelectRead)) {
@@ -1324,7 +1324,7 @@ bool QSymbianSocketEnginePrivate::checkProxy(const QHostAddress &address)
return true;
}
-// FIXME this is also in QNativeSocketEngine, unify it
+// ### this is also in QNativeSocketEngine, unify it
/*! \internal
Sets the error and error string if not set already. The only
diff --git a/src/network/socket/qsymbiansocketengine_p.h b/src/network/socket/qsymbiansocketengine_p.h
index 3b39096..aad6228 100644
--- a/src/network/socket/qsymbiansocketengine_p.h
+++ b/src/network/socket/qsymbiansocketengine_p.h
@@ -195,7 +195,6 @@ public:
mutable QByteArray receivedDataBuffer;
mutable bool hasReceivedBufferedDatagram;
- // FIXME this is duplicated from qnativesocketengine_p.h
enum ErrorString {
NonBlockingInitFailedErrorString,
BroadcastingInitFailedErrorString,
diff --git a/tests/auto/qnetworkreply/test/test.pro b/tests/auto/qnetworkreply/test/test.pro
index d1f6707..5c9bbdd 100644
--- a/tests/auto/qnetworkreply/test/test.pro
+++ b/tests/auto/qnetworkreply/test/test.pro
@@ -31,6 +31,6 @@ symbian:{
# Symbian toolchain does not support correct include semantics
INCLUDEPATH+=..\\..\\..\\..\\include\\QtNetwork\\private
# bigfile test case requires more heap
- TARGET.EPOCHEAPSIZE="0x100 0x10000000"
+ TARGET.EPOCHEAPSIZE="0x100 0x1000000"
TARGET.CAPABILITY="ALL -TCB"
}
diff --git a/tests/auto/qtcpsocket/test/test.pro b/tests/auto/qtcpsocket/test/test.pro
index 7bf5ba0..404d5c0 100644
--- a/tests/auto/qtcpsocket/test/test.pro
+++ b/tests/auto/qtcpsocket/test/test.pro
@@ -12,7 +12,7 @@ QT += network
vxworks:QT -= gui
symbian: {
- TARGET.EPOCHEAPSIZE="0x100 0x3000000"
+ TARGET.EPOCHEAPSIZE="0x100 0x1000000"
TARGET.CAPABILITY = NetworkServices ReadUserData
}
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp
index b78679b..2fa193a 100644
--- a/tests/auto/qurl/tst_qurl.cpp
+++ b/tests/auto/qurl/tst_qurl.cpp
@@ -201,10 +201,9 @@ private slots:
void task_240612();
void taskQTBUG_6962();
void taskQTBUG_8701();
+ void removeAllEncodedQueryItems_data();
+ void removeAllEncodedQueryItems();
-#ifdef QT3_SUPPORT
- void dirPath();
-#endif
};
// Testing get/set functions
@@ -4031,5 +4030,28 @@ void tst_QUrl::effectiveTLDs()
QCOMPARE(domain.topLevelDomain(), TLD);
}
+void tst_QUrl::removeAllEncodedQueryItems_data()
+{
+ QTest::addColumn<QUrl>("url");
+ QTest::addColumn<QByteArray>("key");
+ QTest::addColumn<QUrl>("result");
+
+ QTest::newRow("test1") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&bbb=b&ccc=c") << QByteArray("bbb") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&ccc=c");
+ QTest::newRow("test2") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&bbb=b&ccc=c") << QByteArray("aaa") << QUrl::fromEncoded("http://qt.nokia.com/foo?bbb=b&ccc=c");
+// QTest::newRow("test3") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&bbb=b&ccc=c") << QByteArray("ccc") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&bbb=b");
+ QTest::newRow("test4") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&bbb=b&ccc=c") << QByteArray("b%62b") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&bbb=b&ccc=c");
+ QTest::newRow("test5") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&b%62b=b&ccc=c") << QByteArray("b%62b") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&ccc=c");
+ QTest::newRow("test6") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&b%62b=b&ccc=c") << QByteArray("bbb") << QUrl::fromEncoded("http://qt.nokia.com/foo?aaa=a&b%62b=b&ccc=c");
+}
+
+void tst_QUrl::removeAllEncodedQueryItems()
+{
+ QFETCH(QUrl, url);
+ QFETCH(QByteArray, key);
+ QFETCH(QUrl, result);
+ url.removeAllEncodedQueryItems(key);
+ QCOMPARE(url, result);
+}
+
QTEST_MAIN(tst_QUrl)
#include "tst_qurl.moc"