summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArno Rehn <a.rehn@menlosystems.com>2019-02-04 15:05:50 +0100
committerArno Rehn <a.rehn@menlosystems.com>2019-02-04 14:53:24 +0000
commit38b5128c63ba38303f0587e03536ed546c1f2eca (patch)
tree40031b4b7e389a79b4728d5d4d64589f101c18f2 /src
parent91c92ce0144eb8c0639aef012508e24d8b7e72a5 (diff)
downloadqtwebchannel-38b5128c63ba38303f0587e03536ed546c1f2eca.tar.gz
Correctly unwrap registered objects
Previously, only implicitly wrapped objects have been successfully unwrapped. "Officially" registered objects were not, and thus could not be passed to properties or as method arguments. Change-Id: I6b8644ed3be8db3a66c2c1d5bc167fc33a0b4165 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/webchannel/qmetaobjectpublisher.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/webchannel/qmetaobjectpublisher.cpp b/src/webchannel/qmetaobjectpublisher.cpp
index 6ea3480..b34b39e 100644
--- a/src/webchannel/qmetaobjectpublisher.cpp
+++ b/src/webchannel/qmetaobjectpublisher.cpp
@@ -491,6 +491,9 @@ QObject *QMetaObjectPublisher::unwrapObject(const QString &objectId) const
ObjectInfo objectInfo = wrappedObjects.value(objectId);
if (objectInfo.object && !objectInfo.classinfo.isEmpty())
return objectInfo.object;
+ QObject *object = registeredObjects.value(objectId);
+ if (object)
+ return object;
}
qWarning() << "No wrapped object" << objectId;