diff options
author | Sumedha Widyadharma <sumedha.widyadharma@basyskom.com> | 2014-08-07 16:05:05 +0200 |
---|---|---|
committer | Milian Wolff <milian.wolff@kdab.com> | 2014-12-15 15:15:38 +0100 |
commit | 9fdce8e443030ab99d31e42fffc977cf284c36c4 (patch) | |
tree | 692dae756b25c5ee433550a209e5f950d27b244e /src/webchannel/qmetaobjectpublisher_p.h | |
parent | 0a43a43a166d2e2b551f543de61090637bd8b387 (diff) | |
download | qtwebchannel-9fdce8e443030ab99d31e42fffc977cf284c36c4.tar.gz |
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 <milian.wolff@kdab.com>
Diffstat (limited to 'src/webchannel/qmetaobjectpublisher_p.h')
-rw-r--r-- | src/webchannel/qmetaobjectpublisher_p.h | 10 |
1 files changed, 9 insertions, 1 deletions
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 <QStringList> #include <QMetaObject> #include <QBasicTimer> +#include <QPointer> +#include <QJsonValue> #include "qwebchannelglobal.h" @@ -217,8 +219,14 @@ private: typedef QHash<const QObject *, SignalToArgumentsMap> PendingPropertyUpdates; PendingPropertyUpdates pendingPropertyUpdates; + // Struct containing the object itself and its ObjectInfo + struct ObjectInfo { + QObject* object; + QJsonValue info; + }; + // Maps wrapped object to class info - QHash<const QObject *, QJsonObject> wrappedObjects; + QHash<QString, ObjectInfo> 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 |