Merge lp:~mardy/ubuntu-system-settings-online-accounts/lp1378660 into lp:~online-accounts/ubuntu-system-settings-online-accounts/master

Proposed by Alberto Mardegan
Status: Merged
Merged at revision: 202
Proposed branch: lp:~mardy/ubuntu-system-settings-online-accounts/lp1378660
Merge into: lp:~online-accounts/ubuntu-system-settings-online-accounts/master
Diff against target: 95 lines (+24/-5)
5 files modified
online-accounts-service/request-manager.cpp (+1/-3)
online-accounts-service/request.cpp (+14/-0)
online-accounts-service/request.h (+1/-0)
online-accounts-ui/signonui-request.cpp (+3/-1)
tests/online-accounts-service/tst_service.pro (+5/-1)
To merge this branch: bzr merge lp:~mardy/ubuntu-system-settings-online-accounts/lp1378660
Reviewer Review Type Date Requested Status
David Barth (community) Approve
Review via email: mp+238136@code.launchpad.net

Commit message

Use trusted prompts for SignOnUi

Description of the change

Use trusted prompts for SignOnUi

To post a comment you must log in.
Revision history for this message
David Barth (dbarth) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'online-accounts-service/request-manager.cpp'
--- online-accounts-service/request-manager.cpp 2014-08-19 09:34:33 +0000
+++ online-accounts-service/request-manager.cpp 2014-10-13 11:31:19 +0000
@@ -117,9 +117,7 @@
117 return; // Nothing to do117 return; // Nothing to do
118 }118 }
119119
120 pid_t clientPid = (request->interface() == OAU_INTERFACE) ?120 UiProxy *proxy = new UiProxy(request->clientPid(), this);
121 request->parameters().value(OAU_KEY_PID, 0).toUInt() : 0;
122 UiProxy *proxy = new UiProxy(clientPid, this);
123 if (Q_UNLIKELY(!proxy->init())) {121 if (Q_UNLIKELY(!proxy->init())) {
124 qWarning() << "UiProxy initialization failed!";122 qWarning() << "UiProxy initialization failed!";
125 runQueue(queue);123 runQueue(queue);
126124
=== modified file 'online-accounts-service/request.cpp'
--- online-accounts-service/request.cpp 2014-08-06 13:49:45 +0000
+++ online-accounts-service/request.cpp 2014-10-13 11:31:19 +0000
@@ -22,6 +22,8 @@
22#include "globals.h"22#include "globals.h"
23#include "request.h"23#include "request.h"
2424
25#include <SignOn/uisessiondata_priv.h>
26
25using namespace OnlineAccountsUi;27using namespace OnlineAccountsUi;
2628
27static bool mapIsSuperset(const QVariantMap &test, const QVariantMap &set)29static bool mapIsSuperset(const QVariantMap &test, const QVariantMap &set)
@@ -147,6 +149,18 @@
147 return d->windowId();149 return d->windowId();
148}150}
149151
152pid_t Request::clientPid() const
153{
154 Q_D(const Request);
155 if (interface() == OAU_INTERFACE) {
156 return d->m_parameters.value(OAU_KEY_PID, 0).toUInt();
157 } else if (interface() == SIGNONUI_INTERFACE) {
158 return d->m_parameters.value(SSOUI_KEY_PID, 0).toUInt();
159 }
160
161 return 0;
162}
163
150void Request::setInProgress(bool inProgress)164void Request::setInProgress(bool inProgress)
151{165{
152 Q_D(Request);166 Q_D(Request);
153167
=== modified file 'online-accounts-service/request.h'
--- online-accounts-service/request.h 2014-08-06 13:49:45 +0000
+++ online-accounts-service/request.h 2014-10-13 11:31:19 +0000
@@ -43,6 +43,7 @@
43 static Request *find(const QVariantMap &match);43 static Request *find(const QVariantMap &match);
4444
45 quint64 windowId() const;45 quint64 windowId() const;
46 pid_t clientPid() const;
46 void setInProgress(bool inProgress);47 void setInProgress(bool inProgress);
47 bool isInProgress() const;48 bool isInProgress() const;
48 const QVariantMap &parameters() const;49 const QVariantMap &parameters() const;
4950
=== modified file 'online-accounts-ui/signonui-request.cpp'
--- online-accounts-ui/signonui-request.cpp 2014-10-09 12:24:45 +0000
+++ online-accounts-ui/signonui-request.cpp 2014-10-13 11:31:19 +0000
@@ -245,7 +245,9 @@
245 * Then, if this is called again with the same QWindow, it means that the245 * Then, if this is called again with the same QWindow, it means that the
246 * snap decision was accepted, and we show the window.246 * snap decision was accepted, and we show the window.
247 */247 */
248 if (window == d->m_window) {248 if (window == d->m_window ||
249 /* If we are part of a prompt session, just show the window */
250 !qgetenv("MIR_SOCKET").isEmpty()) {
249 OnlineAccountsUi::Request::setWindow(window);251 OnlineAccountsUi::Request::setWindow(window);
250 d->m_window = 0;252 d->m_window = 0;
251 } else {253 } else {
252254
=== modified file 'tests/online-accounts-service/tst_service.pro'
--- tests/online-accounts-service/tst_service.pro 2014-08-08 11:37:56 +0000
+++ tests/online-accounts-service/tst_service.pro 2014-10-13 11:31:19 +0000
@@ -3,13 +3,17 @@
3TARGET = tst_service3TARGET = tst_service
44
5CONFIG += \5CONFIG += \
6 debug6 debug \
7 link_pkgconfig
78
8QT += \9QT += \
9 core \10 core \
10 dbus \11 dbus \
11 testlib12 testlib
1213
14PKGCONFIG += \
15 signon-plugins-common
16
13DEFINES += \17DEFINES += \
14 NO_REQUEST_FACTORY18 NO_REQUEST_FACTORY
1519

Subscribers

People subscribed via source and target branches