summaryrefslogtreecommitdiffstats
path: root/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp')
-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 e116624d1..aa0705de5 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());