From 1388bed0effca69e1fee0fb080eb035a3653f4c1 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 24 Feb 2009 11:50:03 +0100 Subject: Documented API bookmarks && download classes. Fixed load on startup --- src/application.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/application.cpp') diff --git a/src/application.cpp b/src/application.cpp index c4b4b38f..315c5cf1 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -65,6 +65,9 @@ Application::Application() m_mainWindow = new MainWindow(); m_mainWindow->setObjectName("MainWindow"); setWindowIcon( KIcon("rekonq") ); + newTab(); + mainWindow()->slotHome(); + m_mainWindow->show(); QTimer::singleShot(0, this, SLOT( postLaunch() ) ); @@ -75,7 +78,6 @@ Application::~Application() { delete s_networkAccessManager; delete s_historyManager; - delete m_mainWindow; } @@ -83,7 +85,7 @@ int Application::newInstance() { KCmdLineArgs::setCwd(QDir::currentPath().toUtf8()); KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); - static bool first = true; + if (args->count() > 0) { for (int i = 0; i < args->count(); ++i) @@ -92,17 +94,9 @@ int Application::newInstance() newTab(); mainWindow()->loadUrl( url ); } + args->clear(); } - else - { - if( !first || !isSessionRestored()) - { - newTab(); - mainWindow()->slotHome(); - } - } - first = false; - args->clear(); + return 0; } -- cgit v1.2.1