Fix shortcut saving on KDE, and use the system dialog for Frameworks
[quassel.git] / src / uisupport / actioncollection.cpp
index 4ebb65b..593b236 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2014 by the Quassel Project                        *
+ *   Copyright (C) 2005-2015 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -203,7 +203,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 +212,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 +234,7 @@ void ActionCollection::connectNotify(const char *signal)
         }
     }
 
-#if QT_VERSION >= 0x050000
-    QObject::connectNotify(method);
-#else
     QObject::connectNotify(signal);
-#endif
 }