summaryrefslogtreecommitdiff
path: root/src/application.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-10-11 09:22:46 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-10-11 09:22:46 +0200
commit80c54b321ba3d4b5d37a2da10af32bf7e2b298d0 (patch)
tree22906f3c734388294335079291d1725d22b1da10 /src/application.cpp
parentHUGE COMMIT (diff)
downloadrekonq-80c54b321ba3d4b5d37a2da10af32bf7e2b298d0.tar.xz
Fixing Application::postLaunch() && BookmarksProvider behaviour
Another fantastic patch from Ronny Scholz PS: Ehi, Ronny. I think you need a nickname :D
Diffstat (limited to 'src/application.cpp')
-rw-r--r--src/application.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/application.cpp b/src/application.cpp
index e3c06a5b..fdd02bf5 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -87,6 +87,16 @@ int Application::newInstance()
{
KCmdLineArgs::setCwd(QDir::currentPath().toUtf8());
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
+
+ // we share one process for several mainwindows,
+ // so initialize only once
+ static bool first = true;
+
+ if (first)
+ {
+ QTimer::singleShot(0, this, SLOT(postLaunch()));
+ first = false;
+ }
// is your app session restored? restore session...
// this mechanism also falls back to load usual plain rekonq
@@ -151,6 +161,10 @@ void Application::postLaunch()
Application::historyManager();
Application::sessionManager();
+
+ // bookmarks loading
+ connect(Application::bookmarkProvider(), SIGNAL(openUrl(const KUrl&, const Rekonq::OpenType&)),
+ Application::instance(), SLOT(loadUrl(const KUrl&, const Rekonq::OpenType&)));
}
@@ -393,7 +407,6 @@ MainWindow *Application::newMainWindow()
m_mainWindows.prepend(w);
w->show();
- QTimer::singleShot(0, this, SLOT(postLaunch()));
return w;
}