From 512795f1c5b826b500a2b04d4ac93695c3e7060b Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 13 Jun 2012 12:43:18 +0200 Subject: Minor clean up in App ctor --- src/application.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/application.cpp') diff --git a/src/application.cpp b/src/application.cpp index 9daf5fa2..32c4f658 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -186,15 +186,13 @@ int Application::newInstance() // so, we have 8 possible cases... static bool isFirstLoad = true; bool areThereArguments = (args->count() > 0); - bool isRekonqCrashed = (ReKonfig::recoverOnCrash() > 0); - // note that isRekonqCrashed is always true if it is not the first load - // !isFirstLoad -> isRekonqCrashed + bool hasToBeRecovered = (ReKonfig::recoverOnCrash() > 0); + // note that hasToBeRecovered is always true if it is not the first load + // !isFirstLoad -> hasToBeRecovered kDebug() << "is first load? " << isFirstLoad; kDebug() << "are there arguments? " << areThereArguments; - kDebug() << "is rekonq crashed? " << isRekonqCrashed; - - int exitValue = 1 * isFirstLoad + 2 * areThereArguments + 4 * isRekonqCrashed; + kDebug() << "is rekonq crashed? " << hasToBeRecovered; if (isFirstLoad && isSessionRestored()) { @@ -267,7 +265,7 @@ int Application::newInstance() { if (isFirstLoad) { - if (isRekonqCrashed) + if (hasToBeRecovered) { loadUrl(KUrl("about:closedTabs"), Rekonq::NewWindow); } @@ -312,7 +310,7 @@ int Application::newInstance() if (isFirstLoad) { - if (isRekonqCrashed) + if (hasToBeRecovered) { QTimer::singleShot(1000, mainWindow()->currentTab(), SLOT(showMessageBar())); } @@ -321,7 +319,7 @@ int Application::newInstance() sessionManager()->setSessionManagementEnabled(true); } - if (ReKonfig::checkDefaultSearchEngine() && !isRekonqCrashed && SearchEngine::defaultEngine().isNull()) + if (ReKonfig::checkDefaultSearchEngine() && !hasToBeRecovered && SearchEngine::defaultEngine().isNull()) QTimer::singleShot(2000, mainWindow()->currentTab(), SLOT(showSearchEngineBar())); // updating rekonq configuration -- cgit v1.2.1