From ff724eaf74e1df5e467e27bd64ddde9e1b17d9b2 Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 15 Aug 2008 12:49:58 +0000 Subject: Made client stop reading upon complete xml document and not on connection termination. --- client/sendrecieve.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/sendrecieve.cc b/client/sendrecieve.cc index 95593c6..454ce30 100644 --- a/client/sendrecieve.cc +++ b/client/sendrecieve.cc @@ -144,6 +144,12 @@ void SendRecieve::myReadyReadHandler() ba = tcpsocket->readAll(); ba_all.append(ba); + + // HACK: To test if the received data is a complete xml document. + QDomDocument doc; + if(doc.setContent(ba_all)) { + has_result = true; + } } QByteArray SendRecieve::getResult() -- cgit v1.2.3