From b3cac2409dc0119c8cc4df2fbb605c3559c85365 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 13 Sep 2011 15:50:25 +0200 Subject: Get sure about urls are restored --- src/sessionmanager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/sessionmanager.cpp') diff --git a/src/sessionmanager.cpp b/src/sessionmanager.cpp index 1377132c..00585318 100644 --- a/src/sessionmanager.cpp +++ b/src/sessionmanager.cpp @@ -79,7 +79,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 +151,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); -- cgit v1.2.1