From 5f813f8a4bbe1e075daad7b3933829044befffb4 Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Mon, 5 Sep 2022 20:37:05 +0200 Subject: Reformat code --- src/client/QXmppInvokable.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/client/QXmppInvokable.cpp') diff --git a/src/client/QXmppInvokable.cpp b/src/client/QXmppInvokable.cpp index f995b2c2..518d3b19 100644 --- a/src/client/QXmppInvokable.cpp +++ b/src/client/QXmppInvokable.cpp @@ -28,12 +28,14 @@ QVariant QXmppInvokable::dispatch(const QByteArray &method, const QListmethod(idx).parameterTypes()) + if (paramTypes(args) != metaObject()->method(idx).parameterTypes()) { return QVariant(); + } const char *typeName = metaObject()->method(idx).typeName(); int resultType = QMetaType::type(typeName); @@ -77,16 +79,18 @@ QVariant QXmppInvokable::dispatch(const QByteArray &method, const QList QXmppInvokable::paramTypes(const QList ¶ms) { QList types; - for (const auto &variant : std::as_const(params)) + for (const auto &variant : std::as_const(params)) { types << variant.typeName(); + } return types; } void QXmppInvokable::buildMethodHash() { QWriteLocker locker(&m_lock); - if (m_methodHash.size() > 0) + if (m_methodHash.size() > 0) { return; + } int methodCount = metaObject()->methodCount(); for (int idx = 0; idx < methodCount; ++idx) { -- cgit v1.2.3