@@ -283,9 +283,12 @@ FocusScope {
283 target: DBusUnitySessionService
283 target: DBusUnitySessionService
285 onLogoutRequested: {
285 onLogoutRequested: {
286+ // TODO: Display a dialog to ask the user to confirm.
287+ DBusUnitySessionService.Logout();
288 onLogoutReady: {
290 onLogoutReady: {
291+ // close all the apps.
289 while (true) {
292 while (true) {
290 var app = ApplicationManager.get(0);
293 var app = ApplicationManager.get(0);
291 if (app === null) {
294 if (app === null) {
@@ -293,6 +296,7 @@ FocusScope {
294 ApplicationManager.stopApplication(app.appId);
297 ApplicationManager.stopApplication(app.appId);
296 Qt.quit();
300 Qt.quit();