diff options
author | Martin Petersson <martin.petersson@nokia.com> | 2011-02-24 14:42:33 (GMT) |
---|---|---|
committer | Martin Petersson <martin.petersson@nokia.com> | 2011-02-24 14:42:33 (GMT) |
commit | 747a84637b88ce38697f031a1973b46d44af6099 (patch) | |
tree | 868e6ceda1ba2498b98dba77d941f66b691d22b2 /tests/auto/qnetworkreply | |
parent | 9a4741e679bf186e5f93a855b8f0912bc2e42460 (diff) | |
download | Qt-747a84637b88ce38697f031a1973b46d44af6099.zip Qt-747a84637b88ce38697f031a1973b46d44af6099.tar.gz Qt-747a84637b88ce38697f031a1973b46d44af6099.tar.bz2 |
tst_qnetworkreply: fix the MiniHttpServer.
Reviewed-by: Markus Goetz
Diffstat (limited to 'tests/auto/qnetworkreply')
-rw-r--r-- | tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 6f889c6..93e3051 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -486,7 +486,11 @@ public slots: if (multiple) receivedData.remove(0, doubleEndlPos+4); - client->write(dataToTransmit); + // we need to emulate the bytesWrittenSlot call if the data is empty. + if (dataToTransmit.size() == 0) + QMetaObject::invokeMethod(this, "bytesWrittenSlot", Qt::QueuedConnection); + else + client->write(dataToTransmit); } } |