aboutsummaryrefslogtreecommitdiffstats
path: root/src/webchannel/qmetaobjectpublisher_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-07-16 13:13:03 -0700
committerThiago Macieira <thiago.macieira@intel.com>2022-08-25 21:55:50 -0700
commit40a8e2cb8cc1624b6c4f15f6d4070c2027a1e774 (patch)
treeb647570b81c100ad1a46a049ea39502c071402af /src/webchannel/qmetaobjectpublisher_p.h
parentcb11923e53e417a28dbb87a9e2f164f15c01fec2 (diff)
QMetaObjectPublisher: use new way to QMetaObject::invokeMethod
The new API isn't limited to 10 parameters. It also does its own parameter matching, which we use here to locate the method to be called. I don't think that was necessary, though, because we sort the methods to be called in order of preference. Fixes: QTBUG-105596 Change-Id: I36b24183fbd041179f2ffffd170268620633a72b Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
Diffstat (limited to 'src/webchannel/qmetaobjectpublisher_p.h')
-rw-r--r--src/webchannel/qmetaobjectpublisher_p.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/webchannel/qmetaobjectpublisher_p.h b/src/webchannel/qmetaobjectpublisher_p.h
index 2029225..8605798 100644
--- a/src/webchannel/qmetaobjectpublisher_p.h
+++ b/src/webchannel/qmetaobjectpublisher_p.h
@@ -15,7 +15,7 @@
// We mean it.
//
-#include "variantargument_p.h"
+#include "qwebchannelglobal.h"
#include "signalhandler_p.h"
#include <QStringList>
@@ -29,8 +29,6 @@
#include <unordered_map>
-#include "qwebchannelglobal.h"
-
QT_BEGIN_NAMESPACE
// NOTE: keep in sync with corresponding maps in qwebchannel.js and WebChannelTest.qml
@@ -154,6 +152,12 @@ public:
void sendPendingPropertyUpdates();
/**
+ * Helper function for the invokeMehtods below
+ */
+ QVariant invokeMethod_helper(QObject *const object, const QMetaMethod &method,
+ const QJsonArray &args);
+
+ /**
* Invoke the @p method on @p object with the arguments @p args.
*
* The return value of the method invocation is then serialized and a response message