diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-06-06 06:53:07 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-06-06 06:53:07 +0200 |
| commit | f260085ef199428e9287a3f36387d697709af4ef (patch) | |
| tree | 561a20ac81ef8ef87eb28b9c09ab844f7834125a | |
| parent | 87a1351922dae61d51cbcbb34e43362c27d8434b (diff) | |
| download | qxmpp-f260085ef199428e9287a3f36387d697709af4ef.tar.gz | |
Fix build with Qt5 (Fixes issue #142)
| -rw-r--r-- | CHANGELOG | 1 | ||||
| -rw-r--r-- | src/client/QXmppInvokable.cpp | 8 |
2 files changed, 9 insertions, 0 deletions
@@ -12,6 +12,7 @@ QXmpp 0.5.0 (UNRELEASED) * Issue 64: Compile qxmpp as shared library by default * Issue 79: Export classes for Visual C++ Compiler * Issue 140: Proper XEP-0115 ver string generation with dataforms + * Issue 142: qxmpp does not build in Qt5 QXmpp 0.4.0 (Apr 12, 2012) -------------------------- 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('(')); } } |
