summaryrefslogtreecommitdiff
path: root/src/application.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-02-24 11:50:03 +0100
committerAndrea Diamantini <adjam7@gmail.com>2009-02-24 11:50:03 +0100
commit1388bed0effca69e1fee0fb080eb035a3653f4c1 (patch)
treef9f2bdd05a1e54d6ed4fda632064a6c0f9f26fc0 /src/application.cpp
parentNew Icons! (diff)
downloadrekonq-1388bed0effca69e1fee0fb080eb035a3653f4c1.tar.xz
Documented API bookmarks && download classes.
Fixed load on startup
Diffstat (limited to 'src/application.cpp')
-rw-r--r--src/application.cpp18
1 files changed, 6 insertions, 12 deletions
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;
}