summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorDavid E. Narváez <david.narvaez@computer.org>2013-01-08 00:58:26 -0500
committerDavid E. Narváez <david.narvaez@computer.org>2013-01-08 00:58:26 -0500
commit74af89ec5b993c431ade44cc8615d95ec77b60b9 (patch)
tree99520fc021f6909dbe28709d52350991e4e0b6ae /src/main.cpp
parentRekonq Migration to Nepomuk2 (diff)
downloadrekonq-74af89ec5b993c431ade44cc8615d95ec77b60b9.tar.xz
Restore Tab Windows when Restoring the Session
Modified the restore method so that it returns true in case something is actually restored, and then use that return value to call the restoreTabWindow method of the session manager REVIEW: 108077
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 7f6fcd9e..c7adff7f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -29,6 +29,7 @@
// Local Includes
#include "application.h"
+#include "sessionmanager.h"
#include "tabwindow.h"
#include "urlresolver.h"
@@ -224,10 +225,12 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
QCoreApplication::setApplicationVersion(REKONQ_VERSION);
if (app.isSessionRestored())
- {
for (int i = 1; TabWindow::canBeRestored(i); i++)
- app.newTabWindow()->restore(i);
- }
+ {
+ TabWindow * newTabWindow = app.newTabWindow(false);
+ if (newTabWindow->restore(i))
+ SessionManager::self()->restoreTabWindow(newTabWindow);
+ }
return app.exec();
}