From 215274abfcbe43e5d64ae8104481dc46cd618952 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 6 Mar 2010 00:20:52 +0100 Subject: Just another crash recovery fix. Now rekonq tries just 1 time to recover from crash. In Italy we say "Perseverare e' diabolico"... --- src/application.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/application.cpp') diff --git a/src/application.cpp b/src/application.cpp index 31f0ab2e..efa7bc22 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -81,7 +81,7 @@ Application::~Application() { // ok, we are closing well. // Don't recover on next load.. - ReKonfig::setRecoverOnCrash(false); + ReKonfig::setRecoverOnCrash(0); saveConfiguration(); foreach( QWeakPointer window, m_mainWindows) @@ -147,7 +147,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 (ReKonfig::recoverOnCrash() && sessionManager()->restoreSession()) + if (ReKonfig::recoverOnCrash() == 1 && sessionManager()->restoreSession()) { kDebug() << "session restored"; return 1; @@ -205,7 +205,8 @@ void Application::postLaunch() Application::instance(), SLOT(loadUrl(const KUrl&, const Rekonq::OpenType&))); // crash recovering - ReKonfig::setRecoverOnCrash(true); + int n = ReKonfig::recoverOnCrash(); + ReKonfig::setRecoverOnCrash(++n); saveConfiguration(); } -- cgit v1.2.1