X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Factioncollection.cpp;h=a3aa6d69754463ff99067ead294fed38d9810f1c;hp=0583ce57fa1ce903bdb825e779012eaff7bcc8e8;hb=39328183a6a87c6eb10a9dbbffcd5d65bf154a1f;hpb=694f9bfbf7f1af19108461c7e00d133e55082bce diff --git a/src/uisupport/actioncollection.cpp b/src/uisupport/actioncollection.cpp index 0583ce57..a3aa6d69 100644 --- a/src/uisupport/actioncollection.cpp +++ b/src/uisupport/actioncollection.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-09 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 * @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * *************************************************************************** * Parts of this implementation are based on KDE's KActionCollection. * ***************************************************************************/ @@ -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,20 +203,19 @@ void ActionCollection::actionDestroyed(QObject *obj) unlistAction(action); } - -void ActionCollection::connectNotify(const char *signal) +void ActionCollection::connectNotify(const QMetaMethod &signal) { if (_connectHovered && _connectTriggered) return; - 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())