Merge lp:~townsend/unity8/fix-lp1360316 into lp:unity8

Proposed by Christopher Townsend
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 1572
Merged at revision: 1642
Proposed branch: lp:~townsend/unity8/fix-lp1360316
Merge into: lp:unity8
Diff against target: 58 lines (+20/-0)
3 files modified
plugins/Unity/Session/dbusunitysessionservice.cpp (+11/-0)
plugins/Unity/Session/dbusunitysessionservice.h (+8/-0)
qml/Components/Dialogs.qml (+1/-0)
To merge this branch: bzr merge lp:~townsend/unity8/fix-lp1360316
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+247649@code.launchpad.net

Commit message

Allow for proper logout session management. This uses the EndSession() Upstart DBus method on the current session bus.

Description of the change

For reference, I discussed the implementation of this with Martin Pitt.

* Are there any related MPs required for this MP to build/function as expected?
No

* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

* Did you make sure that your branch does not contain spurious tags?
Yes

* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~townsend/unity8/fix-lp1360316 updated
1571. By Christopher Townsend

Fix some whitespace issues Jenkins is complaining about.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~townsend/unity8/fix-lp1360316 updated
1572. By Christopher Townsend

Fixed another whitespace issue.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

I've tested that branch and it works fine on vivid

Revision history for this message
Albert Astals Cid (aacid) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

 * Did CI run pass?
Known broken stuff

 * Did you make sure that the branch does not contain spurious tags?
Yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Unity/Session/dbusunitysessionservice.cpp'
2--- plugins/Unity/Session/dbusunitysessionservice.cpp 2014-10-09 15:00:32 +0000
3+++ plugins/Unity/Session/dbusunitysessionservice.cpp 2015-01-27 15:03:56 +0000
4@@ -35,6 +35,17 @@
5 Q_EMIT logoutReady();
6 }
7
8+void DBusUnitySessionService::EndSession()
9+{
10+ QDBusConnection connection = QDBusConnection::sessionBus();
11+ QDBusInterface iface1 ("com.ubuntu.Upstart",
12+ "/com/ubuntu/Upstart",
13+ "com.ubuntu.Upstart0_6",
14+ connection);
15+
16+ iface1.call("EndSession");
17+}
18+
19 void DBusUnitySessionService::RequestLogout()
20 {
21 Q_EMIT logoutRequested(false);
22
23=== modified file 'plugins/Unity/Session/dbusunitysessionservice.h'
24--- plugins/Unity/Session/dbusunitysessionservice.h 2014-12-11 13:41:26 +0000
25+++ plugins/Unity/Session/dbusunitysessionservice.h 2015-01-27 15:03:56 +0000
26@@ -39,6 +39,7 @@
27 Q_INVOKABLE void logout() { Logout(); }
28 Q_INVOKABLE void reboot() { Reboot(); }
29 Q_INVOKABLE void shutdown() { Shutdown(); }
30+ Q_INVOKABLE void endSession() { EndSession(); }
31
32 Q_SIGNALS:
33 /**
34@@ -139,6 +140,13 @@
35 */
36 Q_SCRIPTABLE void RequestShutdown();
37
38+ /**
39+ * Issue an EndSession request.
40+ *
41+ * This method calls the EndSession() Upstart DBus method on the
42+ * current DBus session bus.
43+ */
44+ Q_SCRIPTABLE void EndSession();
45 };
46
47 #endif // DBUSUNITYSESSIONSERVICE_H
48
49=== modified file 'qml/Components/Dialogs.qml'
50--- qml/Components/Dialogs.qml 2014-12-08 13:39:01 +0000
51+++ qml/Components/Dialogs.qml 2015-01-27 15:03:56 +0000
52@@ -211,6 +211,7 @@
53 onLogoutReady: {
54 root.closeAllApps();
55 Qt.quit();
56+ unitySessionService.endSession();
57 }
58 }
59

Subscribers

People subscribed via source and target branches