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