X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Factioncollection.cpp;h=6715388b5fab8e4efd736a206d22bd4d8e28ed2c;hp=4ebb65b06a292a8604953029e6bd089f508f3282;hb=b06a827aea68b050bf23c37e0162189a94595ee9;hpb=84cd3561e97167ffb98ecab0fd2b884ba1d13ada diff --git a/src/uisupport/actioncollection.cpp b/src/uisupport/actioncollection.cpp index 4ebb65b0..6715388b 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-2016 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" @@ -203,7 +204,7 @@ void ActionCollection::actionDestroyed(QObject *obj) } #if QT_VERSION >= 0x050000 -void ActionCollection::connectNotify(const QMetaMethod &method) +void ActionCollection::connectNotify(const QMetaMethod &signal) #else void ActionCollection::connectNotify(const char *signal) #endif @@ -212,17 +213,21 @@ void ActionCollection::connectNotify(const char *signal) return; #if QT_VERSION >= 0x050000 - QByteArray signal = method.methodSignature(); -#endif - + if (QMetaMethod::fromSignal(&ActionCollection::actionHovered) == signal) { +#else if (QMetaObject::normalizedSignature(SIGNAL(actionHovered(QAction *))) == signal) { +#endif if (!_connectHovered) { _connectHovered = true; foreach(QAction* action, actions()) connect(action, SIGNAL(hovered()), SLOT(slotActionHovered())); } } +#if QT_VERSION >= 0x050000 + else if (QMetaMethod::fromSignal(&ActionCollection::actionTriggered) == signal) { +#else else if (QMetaObject::normalizedSignature(SIGNAL(actionTriggered(QAction *))) == signal) { +#endif if (!_connectTriggered) { _connectTriggered = true; foreach(QAction* action, actions()) @@ -230,11 +235,7 @@ void ActionCollection::connectNotify(const char *signal) } } -#if QT_VERSION >= 0x050000 - QObject::connectNotify(method); -#else QObject::connectNotify(signal); -#endif }