1
Index: polkit-qt-1-0.95.1/CMakeLists.txt
2
===================================================================
3
--- polkit-qt-1-0.95.1.orig/CMakeLists.txt 2010-07-02 09:59:07.735794971 -0400
4
+++ polkit-qt-1-0.95.1/CMakeLists.txt 2010-07-02 10:00:48.545794971 -0400
6
pkg_check_modules (POLKIT-1 REQUIRED polkit-gobject-1>=0.95)
7
pkg_check_modules (POLKIT-1_AGENT REQUIRED polkit-agent-1>=0.95)
9
+add_definitions(-DQT_NO_KEYWORDS)
11
message(STATUS " ${POLKIT-1_INCLUDE_DIRS} ===========")
14
Index: polkit-qt-1-0.95.1/agent/listeneradapter.cpp
15
===================================================================
16
--- polkit-qt-1-0.95.1.orig/agent/listeneradapter.cpp 2010-07-02 09:59:04.765794971 -0400
17
+++ polkit-qt-1-0.95.1/agent/listeneradapter.cpp 2010-07-02 09:59:21.325794971 -0400
22
- foreach(listItem, m_listeners) {
23
+ Q_FOREACH(listItem, m_listeners) {
26
if (listItem->listener() == listener)
27
Index: polkit-qt-1-0.95.1/agent/polkitqt1-agent-session.cpp
28
===================================================================
29
--- polkit-qt-1-0.95.1.orig/agent/polkitqt1-agent-session.cpp 2010-07-02 09:58:56.375794971 -0400
30
+++ polkit-qt-1-0.95.1/agent/polkitqt1-agent-session.cpp 2010-07-02 09:59:21.325794971 -0400
33
qDebug() << "COMPLETED";
34
Session *session = (Session *)user_data;
35
- emit((Session *)user_data)->completed(gained_authorization);
36
+ Q_EMIT((Session *)user_data)->completed(gained_authorization);
39
void Session::Private::request(PolkitAgentSession *s, gchar *request, gboolean echo_on, gpointer user_data)
41
qDebug() << "REQUEST";
42
- emit((Session *)user_data)->request(QString::fromUtf8(request), echo_on);
43
+ Q_EMIT((Session *)user_data)->request(QString::fromUtf8(request), echo_on);
46
void Session::Private::showError(PolkitAgentSession *s, gchar *text, gpointer user_data)
48
qDebug() << "showError";
49
- emit((Session *)user_data)->showError(QString::fromUtf8(text));
50
+ Q_EMIT((Session *)user_data)->showError(QString::fromUtf8(text));
53
void Session::Private::showInfo(PolkitAgentSession *s, gchar *text, gpointer user_data)
55
qDebug() << "showInfo";
56
- emit((Session *)user_data)->showInfo(QString::fromUtf8(text));
57
+ Q_EMIT((Session *)user_data)->showInfo(QString::fromUtf8(text));
61
Index: polkit-qt-1-0.95.1/core/polkitqt1-authority.cpp
62
===================================================================
63
--- polkit-qt-1-0.95.1.orig/core/polkitqt1-authority.cpp 2010-07-02 09:58:38.075794970 -0400
64
+++ polkit-qt-1-0.95.1/core/polkitqt1-authority.cpp 2010-07-02 09:59:21.325794971 -0400
67
qVariantValue<QDBusArgument> (msg.arguments()[0]) >> seats;
68
// it can be multiple seats present so connect all their signals
69
- foreach(const QString &seat, seats) {
70
+ Q_FOREACH(const QString &seat, seats) {
71
seatSignalsConnect(seat);
75
void Authority::Private::dbusFilter(const QDBusMessage &message)
77
if (message.type() == QDBusMessage::SignalMessage) {
78
- emit q->consoleKitDBChanged();
79
+ Q_EMIT q->consoleKitDBChanged();
81
// TODO: Test this with the multiseat support
82
if (message.member() == "SeatAdded")
85
void Authority::Private::pk_config_changed()
87
- emit Authority::instance()->configChanged();
88
+ Q_EMIT Authority::instance()->configChanged();
91
PolkitAuthority *Authority::polkitAuthority() const
95
if (pkResult != NULL) {
96
- emit authority->checkAuthorizationFinished(polkitResultToResult(pkResult));
97
+ Q_EMIT authority->checkAuthorizationFinished(polkitResultToResult(pkResult));
98
g_object_unref(pkResult);
100
authority->d->setError(E_UnknownResult);
105
- emit authority->enumerateActionsFinished(actionsToListAndFree(list));
106
+ Q_EMIT authority->enumerateActionsFinished(actionsToListAndFree(list));
109
void Authority::enumerateActionsCancel()
114
- emit authority->registerAuthenticationAgentFinished(res);
115
+ Q_EMIT authority->registerAuthenticationAgentFinished(res);
118
void Authority::registerAuthenticationAgentCancel()
123
- emit authority->unregisterAuthenticationAgentFinished(res);
124
+ Q_EMIT authority->unregisterAuthenticationAgentFinished(res);
127
void Authority::unregisterAuthenticationAgentCancel()
132
- emit authority->authenticationAgentResponseFinished(res);
133
+ Q_EMIT authority->authenticationAgentResponseFinished(res);
136
void Authority::authenticationAgentResponseCancel()
141
- emit authority->enumerateTemporaryAuthorizationsFinished(res);
142
+ Q_EMIT authority->enumerateTemporaryAuthorizationsFinished(res);
145
void Authority::enumerateTemporaryAuthorizationsCancel()
150
- emit authority->revokeTemporaryAuthorizationsFinished(res);
151
+ Q_EMIT authority->revokeTemporaryAuthorizationsFinished(res);
154
void Authority::revokeTemporaryAuthorizationsCancel()
159
- emit authority->revokeTemporaryAuthorizationFinished(res);
160
+ Q_EMIT authority->revokeTemporaryAuthorizationFinished(res);
163
void Authority::revokeTemporaryAuthorizationCancel()
164
Index: polkit-qt-1-0.95.1/gui/polkitqt1-gui-action.cpp
165
===================================================================
166
--- polkit-qt-1-0.95.1.orig/gui/polkitqt1-gui-action.cpp 2010-07-02 09:58:00.195794972 -0400
167
+++ polkit-qt-1-0.95.1/gui/polkitqt1-gui-action.cpp 2010-07-02 09:59:21.325794971 -0400
169
switch (d->pkResult) {
171
case Authority::Challenge:
172
- // just emit the 'activated' signal
174
+ // just Q_EMIT the 'activated' signal
175
+ Q_EMIT authorized();
180
* Hence, they probably have a good reason for doing
181
* this so do let the 'activate' signal propagate..
184
+ Q_EMIT authorized();
192
- emit parent->dataChanged();
193
+ Q_EMIT parent->dataChanged();
196
void Action::Private::configChanged()
197
Index: polkit-qt-1-0.95.1/gui/polkitqt1-gui-actionbutton.cpp
198
===================================================================
199
--- polkit-qt-1-0.95.1.orig/gui/polkitqt1-gui-actionbutton.cpp 2010-07-02 09:57:22.455794970 -0400
200
+++ polkit-qt-1-0.95.1/gui/polkitqt1-gui-actionbutton.cpp 2010-07-02 09:59:21.315794971 -0400
205
- foreach(QAbstractButton *ent, buttons) {
206
+ Q_FOREACH(QAbstractButton *ent, buttons) {
207
ent->setVisible(q->isVisible());
208
ent->setEnabled(q->isEnabled());
209
ent->setText(q->text());
214
- foreach(QAbstractButton *ent, d->buttons) {
215
+ Q_FOREACH(QAbstractButton *ent, d->buttons) {
216
if (ent->isCheckable()) {
217
// we set the the current Action state
218
ent->setChecked(isChecked());
222
// First, let's clear the list
223
- foreach(QAbstractButton *ent, d->buttons) {
224
+ Q_FOREACH(QAbstractButton *ent, d->buttons) {
225
d->removeButton(ent);
229
// if we are not checkable BUT the button
230
// is (eg a QCheckBox) we should set all buttons to
232
- foreach(QAbstractButton *ent, buttons) {
233
+ Q_FOREACH(QAbstractButton *ent, buttons) {
234
ent->setCheckable(true);
236
// set the checkable state of Action to store the initial state
241
- emit q->clicked(qobject_cast<QAbstractButton *>(q->sender()), c);
242
+ Q_EMIT q->clicked(qobject_cast<QAbstractButton *>(q->sender()), c);
246
Index: polkit-qt-1-0.95.1/gui/polkitqt1-gui-actionbuttons.cpp
247
===================================================================
248
--- polkit-qt-1-0.95.1.orig/gui/polkitqt1-gui-actionbuttons.cpp 2010-07-02 09:57:55.885794970 -0400
249
+++ polkit-qt-1-0.95.1/gui/polkitqt1-gui-actionbuttons.cpp 2010-07-02 09:59:21.315794971 -0400
252
void ActionButtons::setButtons(const QList<QAbstractButton *> &buttons)
254
- foreach(QAbstractButton *ent, buttons) {
255
+ Q_FOREACH(QAbstractButton *ent, buttons) {