aboutsummaryrefslogtreecommitdiff
path: root/src/client/QXmppInvokable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/QXmppInvokable.cpp')
-rw-r--r--src/client/QXmppInvokable.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/QXmppInvokable.cpp b/src/client/QXmppInvokable.cpp
index 10815734..0bd46f34 100644
--- a/src/client/QXmppInvokable.cpp
+++ b/src/client/QXmppInvokable.cpp
@@ -110,7 +110,11 @@ void QXmppInvokable::buildMethodHash( )
int methodCount = metaObject()->methodCount ();
for( int idx = 0; idx < methodCount; ++idx)
{
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+ QByteArray signature = metaObject()->method(idx).methodSignature();
+#else
QByteArray signature = metaObject()->method(idx).signature();
+#endif
m_methodHash[signature.left(signature.indexOf('('))] = idx;
// qDebug() << metaObject()->method(idx).parameterTypes();
}
@@ -124,7 +128,11 @@ QStringList QXmppInvokable::interfaces( ) const
{
if( metaObject()->method(idx).methodType() == QMetaMethod::Slot )
{
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+ QByteArray signature = metaObject()->method(idx).methodSignature();
+#else
QByteArray signature = metaObject()->method(idx).signature();
+#endif
results << signature.left(signature.indexOf('('));
}
}