summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-07-13 15:48:04 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-07-17 11:28:12 (GMT)
commit430f93c3649aacea5d9ccab047f036027f0622ea (patch)
tree00e4f589bc42617e0f1afa409eba78382b450e2e
parent83670dbf53203757a28b10837b66f46515e1328d (diff)
downloadQt-430f93c3649aacea5d9ccab047f036027f0622ea.zip
Qt-430f93c3649aacea5d9ccab047f036027f0622ea.tar.gz
Qt-430f93c3649aacea5d9ccab047f036027f0622ea.tar.bz2
tst_qhttpnetworkconnection: Fixes
-rw-r--r--tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
index e116624..aa0705d 100644
--- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
+++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
@@ -244,8 +244,8 @@ void tst_QHttpNetworkConnection::get()
QByteArray ba;
do {
QCoreApplication::instance()->processEvents();
- if (reply->bytesAvailable())
- ba += reply->read();
+ while (reply->bytesAvailable())
+ ba += reply->readAny();
if (stopWatch.elapsed() >= 30000)
break;
} while (!reply->isFinished());
@@ -327,7 +327,8 @@ void tst_QHttpNetworkConnection::put()
if (reply->isFinished()) {
QByteArray ba;
- ba += reply->read();
+ while (reply->bytesAvailable())
+ ba += reply->readAny();
} else if(finishedWithErrorCalled) {
if(!succeed) {
delete reply;
@@ -417,8 +418,8 @@ void tst_QHttpNetworkConnection::post()
QByteArray ba;
do {
QCoreApplication::instance()->processEvents();
- if (reply->bytesAvailable())
- ba += reply->read();
+ while (reply->bytesAvailable())
+ ba += reply->readAny();
if (stopWatch.elapsed() >= 30000)
break;
} while (!reply->isFinished());
@@ -616,8 +617,8 @@ void tst_QHttpNetworkConnection::compression()
QByteArray ba;
do {
QCoreApplication::instance()->processEvents();
- if (reply->bytesAvailable())
- ba += reply->read();
+ while (reply->bytesAvailable())
+ ba += reply->readAny();
if (stopWatch.elapsed() >= 30000)
break;
} while (!reply->isFinished());