From f260085ef199428e9287a3f36387d697709af4ef Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Wed, 6 Jun 2012 06:53:07 +0200 Subject: Fix build with Qt5 (Fixes issue #142) --- src/client/QXmppInvokable.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/client/QXmppInvokable.cpp') 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('(')); } } -- cgit v1.2.3