From 317959833a978734f5c0004035e376c592701bf4 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 3 Feb 2012 12:38:30 +0100 Subject: Get sure pdfs are loaded when restoring sessions BUG:292773 --- src/sessionmanager.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/sessionmanager.cpp b/src/sessionmanager.cpp index 0ef0b827..0557fcb4 100644 --- a/src/sessionmanager.cpp +++ b/src/sessionmanager.cpp @@ -172,6 +172,9 @@ bool SessionManager::restoreSessionFromScratch() KUrl u = KUrl(tab.attribute("url")); if (u.protocol() == QL1S("about")) continue; + + // This is needed for particular URLs, eg pdfs + view->load(u); } mv->tabBar()->setCurrentIndex(currentTab); @@ -209,10 +212,9 @@ void SessionManager::restoreCrashedSession() QDataStream readingStream(&history, QIODevice::ReadOnly); readingStream >> *(view->history()); - // Get sure about urls are loaded + // Get sure about urls and/or pdf are loaded KUrl u = KUrl(tab.attribute("url")); - if (u.protocol() == QL1S("about")) - view->load(u); + view->load(u); } mv->tabBar()->setCurrentIndex(currentTab); } @@ -251,10 +253,9 @@ int SessionManager::restoreSavedSession() QDataStream readingStream(&history, QIODevice::ReadOnly); readingStream >> *(view->history()); - // Get sure about urls are loaded + // Get sure about urls and/or pdfs are loaded KUrl u = KUrl(tab.attribute("url")); - if (u.protocol() == QL1S("about")) - view->load(u); + view->load(u); } mv->tabBar()->setCurrentIndex(currentTab); } -- cgit v1.2.1