aboutsummaryrefslogtreecommitdiff
path: root/src/client/QXmppInvokable.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2012-06-06 06:53:07 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2012-06-06 06:53:07 +0200
commitf260085ef199428e9287a3f36387d697709af4ef (patch)
tree561a20ac81ef8ef87eb28b9c09ab844f7834125a /src/client/QXmppInvokable.cpp
parent87a1351922dae61d51cbcbb34e43362c27d8434b (diff)
downloadqxmpp-f260085ef199428e9287a3f36387d697709af4ef.tar.gz
Fix build with Qt5 (Fixes issue #142)
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('('));
}
}