aboutsummaryrefslogtreecommitdiff
path: root/mthemedaemon
diff options
context:
space:
mode:
authorArmin Berres <armin.berres@basyskom.de>2010-06-02 16:41:57 +0200
committerTomas Junnonen <tomas.junnonen@nokia.com>2010-06-03 14:09:36 +0300
commit0ff47b1fb987380748db4fd565ad9cbf9346032b (patch)
tree72b79d56810cbe4362bc96251118c95fb55c070b /mthemedaemon
parent05917edc8a13fa384353444cbf894a3cd3010cc6 (diff)
Fixes: NB#171579 - "widgetsgallery -quitimmediately" does not terminate anymore
RevBy: John Tapsell, Esko Oramaa, Ville Voutilainen Details: You are not allowed to read from a QIODevice with operator<< without beeing sure that the bytes you want to read are actually available. This commit adds the necessary checks and waits for data if needed. It was just pure luck that the current solution was working at all. Not all request were succeeding, we just did not notice the failing ones so far.
Diffstat (limited to 'mthemedaemon')
-rw-r--r--mthemedaemon/mthemedaemonserver.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/mthemedaemon/mthemedaemonserver.cpp b/mthemedaemon/mthemedaemonserver.cpp
index 920579be..4e4a3569 100644
--- a/mthemedaemon/mthemedaemonserver.cpp
+++ b/mthemedaemon/mthemedaemonserver.cpp
@@ -157,6 +157,7 @@ void MThemeDaemonServer::clientDataAvailable()
// create a temporary data stream to read from the socket
QDataStream stream(socket);
+ stream.setVersion(QDataStream::Qt_4_6);
// loop as long as the socket has some data left
while (socket->bytesAvailable()) {