summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-03-05 01:04:28 +0100
committerAndrea Diamantini <adjam7@gmail.com>2010-03-05 01:04:28 +0100
commitfba2312780dd712fff036c3926320d1ceba2adbc (patch)
tree1a52e85218380b4df4b76e2b18d216d381ff8962
parentFix choice between history & bookmarks in the new tab first page. (diff)
downloadrekonq-fba2312780dd712fff036c3926320d1ceba2adbc.tar.xz
Fixing recover on crash
hackish fix :(
-rw-r--r--src/application.cpp11
-rw-r--r--src/rekonq.kcfg3
2 files changed, 13 insertions, 1 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 270cd87f..499c7a37 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -79,6 +79,11 @@ Application::Application()
Application::~Application()
{
+ // ok, we are closing well.
+ // Don't recover on next load..
+ ReKonfig::setRecoverOnCrash(false);
+ saveConfiguration();
+
foreach( QWeakPointer<MainWindow> window, m_mainWindows)
{
delete window.data();
@@ -143,7 +148,7 @@ int Application::newInstance()
// is your app session restored? restore session...
// this mechanism also falls back to load usual plain rekonq
// if something goes wrong...
- if (isSessionRestored() && sessionManager()->restoreSession())
+ if (ReKonfig::recoverOnCrash() && sessionManager()->restoreSession())
{
kDebug() << "session restored";
return 1;
@@ -198,6 +203,10 @@ void Application::postLaunch()
// bookmarks loading
connect(Application::bookmarkProvider(), SIGNAL(openUrl(const KUrl&, const Rekonq::OpenType&)),
Application::instance(), SLOT(loadUrl(const KUrl&, const Rekonq::OpenType&)));
+
+ // crash recovering
+ ReKonfig::setRecoverOnCrash(true);
+ saveConfiguration();
}
diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg
index 0675720c..f68dc7e8 100644
--- a/src/rekonq.kcfg
+++ b/src/rekonq.kcfg
@@ -25,6 +25,9 @@
<entry name="walletBlackList" type="StringList">
<default></default>
</entry>
+ <entry name="recoverOnCrash" type="bool">
+ <default>false</default>
+ </entry>
</group>
<!-- New Tab Page Settings -->