From 7504b595fea9924a4a397cea3dc69fa2e0fd0119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20E=2E=20Narv=C3=A1ez?= Date: Thu, 12 Jan 2012 23:11:33 -0500 Subject: Implement (User) Session Restore This patch implements session management. Most of the ideas are taken from Konsole, which is also a KUniqueApplication but manages session restoring correctly. REVIEW: 103658 --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index a9082d7a..d9c9968f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,6 +29,7 @@ // Local Includes #include "application.h" +#include "mainwindow.h" // KDE Includes #include @@ -212,5 +213,9 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) Application app; + if (app.isSessionRestored()) + for (int i = 1; MainWindow::canBeRestored(i); i++) + app.newMainWindow()->restore(i); + return app.exec(); } -- cgit v1.2.1