X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Factioncollection.cpp;h=a3aa6d69754463ff99067ead294fed38d9810f1c;hp=c918c82119ab816e04a84e17b10629472d3e46ac;hb=e8a39b4c3c92e193ab861a3fea84a261bb6fbd24;hpb=8c8426178ee7e6be923ebb6fe1c96c46d99f57eb diff --git a/src/uisupport/actioncollection.cpp b/src/uisupport/actioncollection.cpp index c918c821..a3aa6d69 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" @@ -136,7 +137,7 @@ void ActionCollection::removeAction(QAction *action) QAction *ActionCollection::takeAction(QAction *action) { if (!unlistAction(action)) - return 0; + return nullptr; foreach(QWidget *widget, _associatedWidgets) { widget->removeAction(action); @@ -202,31 +203,19 @@ void ActionCollection::actionDestroyed(QObject *obj) unlistAction(action); } -#if QT_VERSION >= 0x050000 void ActionCollection::connectNotify(const QMetaMethod &signal) -#else -void ActionCollection::connectNotify(const char *signal) -#endif { if (_connectHovered && _connectTriggered) return; -#if QT_VERSION >= 0x050000 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())