From 097b641c3eb588f1707f87e6a9bedb1d3d8cc31d Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Fri, 19 Sep 2014 17:18:59 +0200 Subject: QNAM: Fix previous HTTP upload CPU fix My previous fix for CPU load issues between HTTP thread and user thread was fragile if the upload QIODevice emitted readyRead() multiple times. [ChangeLog][QtNetwork][QNetworkAccessManager] Fix behavior of upload QIODevice that generate data on readyRead() for HTTP PUT/POST Change-Id: Idb1c2d5a382a704d8cc08fe03c55c883bfc95aa7 Reviewed-by: Christian Kamm Reviewed-by: Richard J. Moore --- tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/auto/network/access/qnetworkreply') diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index 70c118b681..85f706fa04 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -7883,6 +7883,8 @@ protected slots: //qDebug() << Q_FUNC_INFO; bandwidthQuota = 8*1024; // fill quota emit readyRead(); + // Emitting readyRead() several times triggers a bug ("QIODevice::read: Called with maxSize < 0") we fix with this commit + emit readyRead(); } }; -- cgit v1.2.3