X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fsignalproxy.cpp;h=19b9af83e2f36c485947527fb86c609349b530b6;hp=5e5f59d497b449825c38f7aee30995cea37f06ff;hb=ab7ef4d24f62b5848b628482b7762ebfc0b53e1a;hpb=16a42dff7db80813c69527e7f44ec1ca6e6371cb diff --git a/src/common/signalproxy.cpp b/src/common/signalproxy.cpp index 5e5f59d4..19b9af83 100644 --- a/src/common/signalproxy.cpp +++ b/src/common/signalproxy.cpp @@ -96,11 +96,7 @@ void SignalProxy::SignalRelay::attachSignal(QObject *sender, int signalId, const } else { fn = SIGNAL(fakeMethodSignature()); -#if QT_VERSION >= 0x050000 fn = fn.replace("fakeMethodSignature()", sender->metaObject()->method(signalId).methodSignature()); -#else - fn = fn.replace("fakeMethodSignature()", sender->metaObject()->method(signalId).signature()); -#endif } _slots[slotId] = Signal(sender, signalId, fn); @@ -145,11 +141,7 @@ int SignalProxy::SignalRelay::qt_metacall(QMetaObject::Call _c, int _id, void ** const QList &argTypes = eMeta->argTypes(signal.signalId); for (int i = 0; i < argTypes.size(); i++) { if (argTypes[i] == 0) { -#if QT_VERSION >= 0x050000 qWarning() << "SignalRelay::qt_metacall(): received invalid data for argument number" << i << "of signal" << QString("%1::%2").arg(caller->metaObject()->className()).arg(caller->metaObject()->method(signal.signalId).methodSignature().constData()); -#else - qWarning() << "SignalRelay::qt_metacall(): received invalid data for argument number" << i << "of signal" << QString("%1::%2").arg(caller->metaObject()->className()).arg(caller->metaObject()->method(signal.signalId).signature()); -#endif qWarning() << " - make sure all your data types are known by the Qt MetaSystem"; return _id; } @@ -669,11 +661,7 @@ bool SignalProxy::invokeSlot(QObject *receiver, int methodId, const QVariantList // check for argument compatibility and build params array for (int i = 0; i < numArgs; i++) { if (!params[i].isValid()) { -#if QT_VERSION >= 0x050000 qWarning() << "SignalProxy::invokeSlot(): received invalid data for argument number" << i << "of method" << QString("%1::%2()").arg(receiver->metaObject()->className()).arg(receiver->metaObject()->method(methodId).methodSignature().constData()); -#else - qWarning() << "SignalProxy::invokeSlot(): received invalid data for argument number" << i << "of method" << QString("%1::%2()").arg(receiver->metaObject()->className()).arg(receiver->metaObject()->method(methodId).signature()); -#endif qWarning() << " - make sure all your data types are known by the Qt MetaSystem"; return false; } @@ -896,11 +884,7 @@ SignalProxy::ExtendedMetaObject::ExtendedMetaObject(const QMetaObject *meta, boo if (_meta->method(i).methodType() != QMetaMethod::Slot) continue; -#if QT_VERSION >= 0x050000 if (_meta->method(i).methodSignature().contains('*')) -#else - if (QByteArray(_meta->method(i).signature()).contains('*')) -#endif continue; // skip methods with ptr params QByteArray method = methodName(_meta->method(i)); @@ -929,11 +913,7 @@ SignalProxy::ExtendedMetaObject::ExtendedMetaObject(const QMetaObject *meta, boo } if (checkConflicts) { qWarning() << "class" << meta->className() << "contains overloaded methods which is currently not supported!"; -#if QT_VERSION >= 0x050000 qWarning() << " - " << _meta->method(i).methodSignature() << "conflicts with" << _meta->method(_methodIds[method]).methodSignature(); -#else - qWarning() << " - " << _meta->method(i).signature() << "conflicts with" << _meta->method(_methodIds[method]).signature(); -#endif } continue; } @@ -973,11 +953,7 @@ const QHash &SignalProxy::ExtendedMetaObject::receiveMap() if (QMetaType::Void == (QMetaType::Type)returnType(i)) continue; -#if QT_VERSION >= 0x050000 signature = requestSlot.methodSignature(); -#else - signature = QByteArray(requestSlot.signature()); -#endif if (!signature.startsWith("request")) continue; @@ -1011,22 +987,14 @@ const QHash &SignalProxy::ExtendedMetaObject::receiveMap() QByteArray SignalProxy::ExtendedMetaObject::methodName(const QMetaMethod &method) { -#if QT_VERSION >= 0x050000 QByteArray sig(method.methodSignature()); -#else - QByteArray sig(method.signature()); -#endif return sig.left(sig.indexOf("(")); } QString SignalProxy::ExtendedMetaObject::methodBaseName(const QMetaMethod &method) { -#if QT_VERSION >= 0x050000 QString methodname = QString(method.methodSignature()).section("(", 0, 0); -#else - QString methodname = QString(method.signature()).section("(", 0, 0); -#endif // determine where we have to chop: int upperCharPos; @@ -1064,11 +1032,7 @@ SignalProxy::ExtendedMetaObject::MethodDescriptor::MethodDescriptor(const QMetaM _argTypes = argTypes; // determine minArgCount -#if QT_VERSION >= 0x050000 QString signature(method.methodSignature()); -#else - QString signature(method.signature()); -#endif _minArgCount = method.parameterTypes().count() - signature.count("="); _receiverMode = (_methodName.startsWith("request"))