From 0eba0e31b8e7b2aaafc8b40d01b9b7bd977d8e54 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 15 Jun 2010 00:54:21 +0200 Subject: no more currenttab & digit closed tabs BUG:241495 --- src/sessionmanager.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/sessionmanager.cpp b/src/sessionmanager.cpp index 6eb0cb6c..56e24f16 100644 --- a/src/sessionmanager.cpp +++ b/src/sessionmanager.cpp @@ -107,14 +107,14 @@ bool SessionManager::restoreSession() do { line = in.readLine(); - if (line == QString("window")) + if (line == QL1S("window")) { line = in.readLine(); Application::instance()->loadUrl( KUrl(line), Rekonq::NewWindow); } else { - if (line == QString("currenttab")) + if (line == QL1S("currenttab")) { line = in.readLine(); bool ok; @@ -129,10 +129,6 @@ bool SessionManager::restoreSession() emit mv->tabBar()->setCurrentIndex(idx); } } - else - { - kDebug() << "Failed to convert currenttab index line <" << line << "> to in value" << endl; - } } else { @@ -164,9 +160,16 @@ QStringList SessionManager::closedSites() do { line = in.readLine(); - if (line != QString("window")) + if (line != QL1S("window")) { - list << QString(line); + if(line == QL1S("currenttab")) + { + in.readLine(); // drop out the next field, containing the index of the current tab.. + } + else + { + list << QString(line); + } } } while (!line.isEmpty()); -- cgit v1.2.1