summaryrefslogtreecommitdiff
path: root/src/sessionmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sessionmanager.cpp')
-rw-r--r--src/sessionmanager.cpp33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/sessionmanager.cpp b/src/sessionmanager.cpp
index 0b50791d..6aada509 100644
--- a/src/sessionmanager.cpp
+++ b/src/sessionmanager.cpp
@@ -106,15 +106,44 @@ bool SessionManager::restoreSession()
{
line = in.readLine();
kDebug() << "New Window line: " << line;
- Application::instance()->loadUrl(line, Rekonq::NewWindow);
+ Application::instance()->loadUrl( KUrl(line), Rekonq::NewWindow);
}
else
{
kDebug() << "New Current Tab line: " << line;
- Application::instance()->loadUrl(line, Rekonq::NewCurrentTab);
+ Application::instance()->loadUrl( KUrl(line), Rekonq::NewCurrentTab);
}
}
while (!line.isEmpty());
return true;
}
+
+
+QStringList SessionManager::closedSites()
+{
+ QStringList list;
+
+ QFile sessionFile(m_sessionFilePath);
+ if (!sessionFile.exists())
+ return list;
+ if (!sessionFile.open(QFile::ReadOnly))
+ {
+ kDebug() << "Unable to open session file" << sessionFile.fileName();
+ return list;
+ }
+
+ QTextStream in(&sessionFile);
+ QString line;
+ do
+ {
+ line = in.readLine();
+ if (line != QString("window"))
+ {
+ list << QString(line);
+ }
+ }
+ while (!line.isEmpty());
+
+ return list;
+}