X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Factioncollection.cpp;h=89280532aa3ccc9aab80587d8eed39373d748b1a;hp=4ebb65b06a292a8604953029e6bd089f508f3282;hb=1a45f16a9734820fba42fe1db3f38dd1eee49df6;hpb=f13ee12590d103b3512ba74c0bef3b0817c4c947 diff --git a/src/uisupport/actioncollection.cpp b/src/uisupport/actioncollection.cpp index 4ebb65b0..89280532 100644 --- a/src/uisupport/actioncollection.cpp +++ b/src/uisupport/actioncollection.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2014 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -24,6 +24,7 @@ #include #include +#include #include "actioncollection.h" @@ -202,27 +203,19 @@ void ActionCollection::actionDestroyed(QObject *obj) unlistAction(action); } -#if QT_VERSION >= 0x050000 -void ActionCollection::connectNotify(const QMetaMethod &method) -#else -void ActionCollection::connectNotify(const char *signal) -#endif +void ActionCollection::connectNotify(const QMetaMethod &signal) { if (_connectHovered && _connectTriggered) return; -#if QT_VERSION >= 0x050000 - QByteArray signal = method.methodSignature(); -#endif - - if (QMetaObject::normalizedSignature(SIGNAL(actionHovered(QAction *))) == signal) { + if (QMetaMethod::fromSignal(&ActionCollection::actionHovered) == signal) { if (!_connectHovered) { _connectHovered = true; foreach(QAction* action, actions()) connect(action, SIGNAL(hovered()), SLOT(slotActionHovered())); } } - else if (QMetaObject::normalizedSignature(SIGNAL(actionTriggered(QAction *))) == signal) { + else if (QMetaMethod::fromSignal(&ActionCollection::actionTriggered) == signal) { if (!_connectTriggered) { _connectTriggered = true; foreach(QAction* action, actions()) @@ -230,11 +223,7 @@ void ActionCollection::connectNotify(const char *signal) } } -#if QT_VERSION >= 0x050000 - QObject::connectNotify(method); -#else QObject::connectNotify(signal); -#endif }