diff options
Diffstat (limited to 'src/application.cpp')
-rw-r--r-- | src/application.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/application.cpp b/src/application.cpp index 97d9a571..5867211f 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -174,17 +174,17 @@ int Application::newInstance() switch (ReKonfig::startupBehaviour()) { case 0: // open home page - mainWindow()->homePage(); + newMainWindow()->homePage(); break; case 1: // open new tab page - loadUrl(KUrl("about:home")); + loadUrl(KUrl("about:home"), Rekonq::NewWindow); break; case 2: // restore session sessionManager()->restoreSession(); kDebug() << "session restored following settings"; break; default: - mainWindow()->homePage(); + newMainWindow()->homePage(); break; } } @@ -253,13 +253,13 @@ void Application::saveConfiguration() const MainWindow *Application::mainWindow() { - if (m_mainWindows.isEmpty()) - return newMainWindow(); - MainWindow *active = qobject_cast<MainWindow*>(QApplication::activeWindow()); if (!active) { + if(m_mainWindows.isEmpty()) + return 0; + return m_mainWindows.at(0).data(); } return active; |