diff options
author | Kai Dohmen <psykai1993@googlemail.com> | 2016-04-11 19:38:50 +0200 |
---|---|---|
committer | Milian Wolff <milian.wolff@kdab.com> | 2016-06-21 09:50:33 +0000 |
commit | f48e8c9711fbeb350ccf70f852ce3732844d4287 (patch) | |
tree | 43756259e8794b89801cdc2aa936840af92c5d98 /src/webchannel/qmetaobjectpublisher_p.h | |
parent | 3be67a7799aa1960d459548a43ddf54044f80ec1 (diff) | |
download | qtwebchannel-f48e8c9711fbeb350ccf70f852ce3732844d4287.tar.gz |
Make passing objects from website to server possible
If you get an object from the server and want to pass it back to the
server via a function the id of the object is passed instead of the
whole json object. On the server side QMetaObjectPublisher::invokeMethod
now looks up the object in QMetaObjectPublisher::wrappedObjects by the
passed object-id.
Task-number: QTBUG-50075
Change-Id: Id0df2dfaa79bcba12ca48391ae7537ac1a086898
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Diffstat (limited to 'src/webchannel/qmetaobjectpublisher_p.h')
-rw-r--r-- | src/webchannel/qmetaobjectpublisher_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/webchannel/qmetaobjectpublisher_p.h b/src/webchannel/qmetaobjectpublisher_p.h index b0ebd84..048a33c 100644 --- a/src/webchannel/qmetaobjectpublisher_p.h +++ b/src/webchannel/qmetaobjectpublisher_p.h @@ -166,6 +166,10 @@ public: */ void objectDestroyed(const QObject *object); + QObject *unwrapObject(const QString &objectId) const; + + QVariant toVariant(const QJsonValue &value, int targetType) const; + /** * Given a QVariant containing a QObject*, wrap the object and register for property updates * return the objects class information. |