From 747a84637b88ce38697f031a1973b46d44af6099 Mon Sep 17 00:00:00 2001 From: Martin Petersson Date: Thu, 24 Feb 2011 15:42:33 +0100 Subject: tst_qnetworkreply: fix the MiniHttpServer. Reviewed-by: Markus Goetz --- tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); } } -- cgit v0.12