summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2013-03-18 19:30:58 +0100
committerAndrea Diamantini <adjam7@gmail.com>2013-03-18 19:30:58 +0100
commit901e304376f931d10e9082b5ea919d3cd1cd1250 (patch)
treecb57e0673ef830e7c2302c7c8e267fe471864ed0 /src
parentFallback opening a new tab page is session file is NOT found (diff)
downloadrekonq-901e304376f931d10e9082b5ea919d3cd1cd1250.tar.xz
Let user decide if session has to be restored or not after crash :)
BUG: 316960
Diffstat (limited to 'src')
-rw-r--r--src/application.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 696185f9..bf326888 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -194,7 +194,10 @@ int Application::newInstance()
bool restoreOk = false;
if (ReKonfig::startupBehaviour() == 2)
{
- restoreOk = SessionManager::self()->restoreSessionFromScratch();
+ if (hasToBeRecoveredFromCrash)
+ restoreOk = false;
+ else
+ restoreOk = SessionManager::self()->restoreSessionFromScratch();
}
else
{
@@ -288,13 +291,13 @@ int Application::newInstance()
loadUrl(KUrl("about:home"), Rekonq::NewPrivateWindow);
break;
}
- if (!SessionManager::self()->restoreSessionFromScratch())
+ if (hasToBeRecoveredFromCrash || !SessionManager::self()->restoreSessionFromScratch())
{
loadUrl(KUrl("about:home") , Rekonq::NewTab);
}
break;
default:
- newWindow()->tabWidget()->newTab();
+ ASSERT_NOT_REACHED(unknown startup behavior);
break;
}
}