summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLutz Schönemann <lutz.schoenemann@basyskom.com>2014-08-11 17:20:27 +0200
committerSumedha Widyadharma <sumedha.widyadharma@basyskom.com>2014-08-12 10:03:42 +0200
commit150fba9166d0cd63079d8ed15af5f80a759e9549 (patch)
tree3b500ea8c3906ca3e41c915ee959fa2988d2d2ae /src
parent313db65d41c1a69053fd32a07ece1d8eca223916 (diff)
downloadqtwebchannel-150fba9166d0cd63079d8ed15af5f80a759e9549.tar.gz
Fixing idlestate if used with synchronous transport
If QtWebChannel is used with a synchronous transport it can happen that the clients idle state is wrong because the clients idle message is received before the idle state is set to 'false'. This patch changes the order of setting the idle state and broadcasting the property update message to avoid that problem. Change-Id: I7762b5279febb99d3cb2e110ec9306596fc71e14 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/webchannel/qmetaobjectpublisher.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/webchannel/qmetaobjectpublisher.cpp b/src/webchannel/qmetaobjectpublisher.cpp
index 14b94f8..eb2fdbd 100644
--- a/src/webchannel/qmetaobjectpublisher.cpp
+++ b/src/webchannel/qmetaobjectpublisher.cpp
@@ -315,8 +315,8 @@ void QMetaObjectPublisher::sendPendingPropertyUpdates()
QJsonObject message;
message[KEY_TYPE] = TypePropertyUpdate;
message[KEY_DATA] = data;
- broadcastMessage(message);
setClientIsIdle(false);
+ broadcastMessage(message);
}
QJsonValue QMetaObjectPublisher::invokeMethod(QObject *const object, const int methodIndex,