From 9fdce8e443030ab99d31e42fffc977cf284c36c4 Mon Sep 17 00:00:00 2001 From: Sumedha Widyadharma Date: Thu, 7 Aug 2014 16:05:05 +0200 Subject: Separate registered and autoregistered QObjects Currently, a new client gets a list of _all_ registered QObjects, whether they were explicitly registered or not. This leaks internal information which the clients cannot use right away anyway. Change-Id: I4b25a731e9bc2d646f903057b409aecd34dc7f11 Reviewed-by: Milian Wolff --- src/webchannel/qmetaobjectpublisher_p.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/webchannel/qmetaobjectpublisher_p.h') diff --git a/src/webchannel/qmetaobjectpublisher_p.h b/src/webchannel/qmetaobjectpublisher_p.h index eda17d9..6ba5ee7 100644 --- a/src/webchannel/qmetaobjectpublisher_p.h +++ b/src/webchannel/qmetaobjectpublisher_p.h @@ -40,6 +40,8 @@ #include #include #include +#include +#include #include "qwebchannelglobal.h" @@ -217,8 +219,14 @@ private: typedef QHash PendingPropertyUpdates; PendingPropertyUpdates pendingPropertyUpdates; + // Struct containing the object itself and its ObjectInfo + struct ObjectInfo { + QObject* object; + QJsonValue info; + }; + // Maps wrapped object to class info - QHash wrappedObjects; + QHash wrappedObjects; // Aggregate property updates since we get multiple Qt.idle message when we have multiple // clients. They all share the same QWebProcess though so we must take special care to -- cgit v1.2.1