summaryrefslogtreecommitdiff
path: root/src/webchannel/qmetaobjectpublisher.cpp
diff options
context:
space:
mode:
authorLutz Schönemann <lutz.schoenemann@basyskom.com>2014-08-18 18:11:34 +0200
committerLutz Schönemann <lutz.schoenemann@basyskom.com>2014-08-19 09:41:56 +0200
commit6766582f7b52de38d4cae197766099ae2242ae3e (patch)
treea0a1f94c56c74f34f816448277c35ae32c216b6c /src/webchannel/qmetaobjectpublisher.cpp
parentb91b39a7e4f0156706fde4a77379719df86e6bfa (diff)
downloadqtwebchannel-6766582f7b52de38d4cae197766099ae2242ae3e.tar.gz
Fixing property update for wrapped objects
Returned QObject pointer got wrapped correctly but a wrong QJsonObject was given to initializePropertyUpdates() method. Change-Id: I157b862ba2a90e87c295beb3c02fff932aac83c6 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Diffstat (limited to 'src/webchannel/qmetaobjectpublisher.cpp')
-rw-r--r--src/webchannel/qmetaobjectpublisher.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/webchannel/qmetaobjectpublisher.cpp b/src/webchannel/qmetaobjectpublisher.cpp
index eb2fdbd..a6e3e65 100644
--- a/src/webchannel/qmetaobjectpublisher.cpp
+++ b/src/webchannel/qmetaobjectpublisher.cpp
@@ -441,15 +441,16 @@ QJsonValue QMetaObjectPublisher::wrapResult(const QVariant &result)
const QString &id = QUuid::createUuid().toString();
Q_ASSERT(!registeredObjectIds.contains(object));
+ QJsonObject info = classInfoForObject(object);
objectInfo[KEY_QOBJECT] = true;
objectInfo[KEY_ID] = id;
- objectInfo[KEY_DATA] = classInfoForObject(object);
+ objectInfo[KEY_DATA] = info;
registeredObjectIds[object] = id;
registeredObjects[id] = object;
wrappedObjects.insert(object, objectInfo);
- initializePropertyUpdates(object, objectInfo);
+ initializePropertyUpdates(object, info);
return objectInfo;
}