Blob Blame History Raw
From 5d3fdc79b2b47f21f09351e16f677d55c1907f13 Mon Sep 17 00:00:00 2001
From: Dario Freddi <drf@kde.org>
Date: Mon, 30 Jan 2012 02:44:08 +0100
Subject: [PATCH 2/4] Normalize connect() using Qt's normalize

---
 core/polkitqt1-authority.cpp |  2 +-
 examples/PkExample.cpp       | 16 ++++++++--------
 examples/agent/klistener.cpp |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/core/polkitqt1-authority.cpp b/core/polkitqt1-authority.cpp
index 0951d97..f134ca6 100644
--- a/core/polkitqt1-authority.cpp
+++ b/core/polkitqt1-authority.cpp
@@ -256,7 +256,7 @@ void Authority::Private::dbusSignalAdd(const QString &service, const QString &pa
 {
     // FIXME: This code seems to be nonfunctional - it needs to be fixed somewhere (is it Qt BUG?)
     QDBusConnection::systemBus().connect(service, path, interface, name,
-                                         q, SLOT(dbusFilter(const QDBusMessage &)));
+                                         q, SLOT(dbusFilter(QDBusMessage)));
 }
 
 void Authority::Private::dbusFilter(const QDBusMessage &message)
diff --git a/examples/PkExample.cpp b/examples/PkExample.cpp
index 2168a91..e7e1ff2 100644
--- a/examples/PkExample.cpp
+++ b/examples/PkExample.cpp
@@ -59,7 +59,7 @@ PkExample::PkExample(QMainWindow *parent)
     // This signal was propagated from the QAbstractButton just for
     // convenience in this case we don't have any benefit but the code
     // look cleaner
-    connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
+    connect(bt, SIGNAL(clicked(QAbstractButton*,bool)), bt, SLOT(activate()));
     // this is the Action activated signal, it is always emmited whenever
     // someone click and get authorized to do the action
     connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
@@ -70,7 +70,7 @@ PkExample::PkExample(QMainWindow *parent)
     menuActions->addAction(qobject_cast<Action *>(bt));
     toolBar->addAction(qobject_cast<Action *>(bt));
     connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
-    connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
+    connect(bt, SIGNAL(clicked(QAbstractButton*,bool)), bt, SLOT(activate()));
     connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
 
     bt = new ActionButton(bleedPB, "org.qt.policykit.examples.bleed", this);
@@ -79,7 +79,7 @@ PkExample::PkExample(QMainWindow *parent)
     menuActions->addAction(qobject_cast<Action *>(bt));
     toolBar->addAction(qobject_cast<Action *>(bt));
     connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
-    connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
+    connect(bt, SIGNAL(clicked(QAbstractButton*,bool)), bt, SLOT(activate()));
     connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
 
     // This action is more customized
@@ -103,7 +103,7 @@ PkExample::PkExample(QMainWindow *parent)
     menuActions->addAction(qobject_cast<Action *>(bt));
     toolBar->addAction(qobject_cast<Action *>(bt));
     connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
-    connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
+    connect(bt, SIGNAL(clicked(QAbstractButton*,bool)), bt, SLOT(activate()));
     connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
 
     bt = new ActionButton(deletePB, "org.qt.policykit.examples.delete", this);
@@ -114,7 +114,7 @@ PkExample::PkExample(QMainWindow *parent)
     menuActions->addAction(qobject_cast<Action *>(bt));
     toolBar->addAction(qobject_cast<Action *>(bt));
     connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
-    connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
+    connect(bt, SIGNAL(clicked(QAbstractButton*,bool)), bt, SLOT(activate()));
     connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
 
     bt = new ActionButton(listenPB, "org.qt.policykit.examples.listen", this);
@@ -125,7 +125,7 @@ PkExample::PkExample(QMainWindow *parent)
     menuActions->addAction(qobject_cast<Action *>(bt));
     toolBar->addAction(qobject_cast<Action *>(bt));
     connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
-    connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
+    connect(bt, SIGNAL(clicked(QAbstractButton*,bool)), bt, SLOT(activate()));
     connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
 
     bt = new ActionButton(setPB, "org.qt.policykit.examples.set", this);
@@ -136,7 +136,7 @@ PkExample::PkExample(QMainWindow *parent)
     menuActions->addAction(qobject_cast<Action *>(bt));
     toolBar->addAction(qobject_cast<Action *>(bt));
     connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
-    connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
+    connect(bt, SIGNAL(clicked(QAbstractButton*,bool)), bt, SLOT(activate()));
     connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
 
     bt = new ActionButton(shoutPB, "org.qt.policykit.examples.shout", this);
@@ -149,7 +149,7 @@ PkExample::PkExample(QMainWindow *parent)
     menuActions->addAction(qobject_cast<Action *>(bt));
     toolBar->addAction(qobject_cast<Action *>(bt));
     connect(bt, SIGNAL(triggered(bool)), this, SLOT(activateAction()));
-    connect(bt, SIGNAL(clicked(QAbstractButton *, bool)), bt, SLOT(activate()));
+    connect(bt, SIGNAL(clicked(QAbstractButton*,bool)), bt, SLOT(activate()));
     connect(bt, SIGNAL(authorized()), this, SLOT(actionActivated()));
 
     // test configChanged
diff --git a/examples/agent/klistener.cpp b/examples/agent/klistener.cpp
index 32bfb98..e229899 100644
--- a/examples/agent/klistener.cpp
+++ b/examples/agent/klistener.cpp
@@ -51,7 +51,7 @@ void KListener::initiateAuthentication(const QString &actionId,
         qDebug() << identity.toString();
         Session *session;
         session = new Session(identity, cookie, result);
-        connect(session, SIGNAL(request(QString, bool)), this, SLOT(request(QString, bool)));
+        connect(session, SIGNAL(request(QString,bool)), this, SLOT(request(QString,bool)));
         connect(session, SIGNAL(completed(bool)), this, SLOT(completed(bool)));
         connect(session, SIGNAL(showError(QString)), this, SLOT(showError(QString)));
         connect(session, SIGNAL(showInfo(QString)), this, SLOT(showInfo(QString)));
-- 
1.8.4.2