diff options
author | Johannes Tröscher <fritz_van_tom@hotmail.com> | 2011-09-13 19:49:31 +0200 |
---|---|---|
committer | Johannes Tröscher <fritz_van_tom@hotmail.com> | 2011-09-13 19:49:31 +0200 |
commit | 67f7e374770103d1556cca48e907b3cbff6ac491 (patch) | |
tree | b47a60d29cfbd540d3fa45eab0db26af154a8b97 /src/sessionmanager.cpp | |
parent | load clipboard url on middle-click if autoscroll is disabled (diff) | |
parent | Fix close & session (diff) | |
download | rekonq-67f7e374770103d1556cca48e907b3cbff6ac491.tar.xz |
Merge branch 'master' of git.kde.org:rekonq
Diffstat (limited to 'src/sessionmanager.cpp')
-rw-r--r-- | src/sessionmanager.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sessionmanager.cpp b/src/sessionmanager.cpp index 1377132c..c4697f4b 100644 --- a/src/sessionmanager.cpp +++ b/src/sessionmanager.cpp @@ -58,6 +58,7 @@ void SessionManager::saveSession() return; m_safe = false; + kDebug() << "SAVING SESSION..."; QFile sessionFile(m_sessionFilePath); if (!sessionFile.open(QFile::WriteOnly | QFile::Truncate)) @@ -79,7 +80,7 @@ void SessionManager::saveSession() QDomElement tab = document.createElement("tab"); tab.setAttribute("title", mv->webTab(tabNo)->view()->title()); // redundant, but needed for closedSites() // as there's not way to read out the historyData - tab.setAttribute("url", mv->webTab(tabNo)->view()->url().toString()); + tab.setAttribute("url", mv->webTab(tabNo)->url().url()); // Use WebTab's instead of WebView's url() to fix about links if (mv->tabBar()->currentIndex() == tabNo) { tab.setAttribute("currentTab", 1); @@ -151,6 +152,11 @@ bool SessionManager::restoreSession() QDataStream readingStream(&history, QIODevice::ReadOnly); readingStream >> *(view->history()); + + // Get sure about urls are loaded + KUrl u = KUrl(tab.attribute("url")); + if (u.protocol() == QL1S("about")) + view->load(u); } mv->tabBar()->setCurrentIndex(currentTab); |