summaryrefslogtreecommitdiff
path: root/src/webchannel/qmetaobjectpublisher_p.h
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2015-02-04 19:12:12 +0100
committerMilian Wolff <milian.wolff@kdab.com>2015-02-04 19:12:12 +0100
commit801076803ce92d7bd646a58c792015c2b833d0c5 (patch)
treeb9bc16705a541cf402ee4614da7115135efb19d5 /src/webchannel/qmetaobjectpublisher_p.h
parent9d705911391c456813ce54a52f70aa2ccbc5b553 (diff)
parent358e5acba3154a8ab4b53b22797c2c1eae4707dc (diff)
downloadqtwebchannel-801076803ce92d7bd646a58c792015c2b833d0c5.tar.gz
Merge branch '5.4' into dev
This merge required extensive conflict handling because the bug fix in 5.4 to properly wrap and forward QObjects referenced by published objects' properties clashed with some feature additions in dev, namely the client separation logic. All unit test pass for me locally now again. Conflicts: .qmake.conf src/webchannel/qmetaobjectpublisher.cpp tests/auto/qml/tst_webchannel.qml Change-Id: If3d00e13b265c6ab9fb2c38023014f97f8e7779b
Diffstat (limited to 'src/webchannel/qmetaobjectpublisher_p.h')
-rw-r--r--src/webchannel/qmetaobjectpublisher_p.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/webchannel/qmetaobjectpublisher_p.h b/src/webchannel/qmetaobjectpublisher_p.h
index 1d269f1..359135c 100644
--- a/src/webchannel/qmetaobjectpublisher_p.h
+++ b/src/webchannel/qmetaobjectpublisher_p.h
@@ -95,7 +95,7 @@ public:
/**
* Serialize the QMetaObject of @p object and return it in JSON form.
*/
- QJsonObject classInfoForObject(const QObject *object) const;
+ QJsonObject classInfoForObject(const QObject *object, QWebChannelAbstractTransport *transport);
/**
* Set the client to idle or busy, based on the value of @p isIdle.
@@ -109,7 +109,7 @@ public:
*
* Furthermore, if that was not done already, connect to their property notify signals.
*/
- QJsonObject initializeClient();
+ QJsonObject initializeClient(QWebChannelAbstractTransport *transport);
/**
* Go through all properties of the given object and connect to their notify signal.
@@ -155,10 +155,17 @@ public:
* return the objects class information.
*
* All other input types are returned as-is.
+ */
+ QJsonValue wrapResult(const QVariant &result, QWebChannelAbstractTransport *transport,
+ const QString &parentObjectId = QString());
+
+ /**
+ * Convert a list of variant values for consumption by the client.
*
- * TODO: support wrapping of initially-registered objects
+ * This properly handles QML values and also wraps the result if required.
*/
- QJsonValue wrapResult(const QVariant &result, QWebChannelAbstractTransport *transport);
+ QJsonArray wrapList(const QVariantList &list, QWebChannelAbstractTransport *transport,
+ const QString &parentObjectId = QString());
/**
* Invoke delete later on @p object.