diff options
Diffstat (limited to 'src/application.cpp')
-rw-r--r-- | src/application.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/application.cpp b/src/application.cpp index 25b328e6..eee803bc 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -79,12 +79,12 @@ int Application::newInstance() if (!m_mainWindow) { m_mainWindow = new MainWindow(); - + m_mainWindow->setObjectName("MainWindow"); setWindowIcon(KIcon("rekonq")); - + m_mainWindow->show(); - + QTimer::singleShot(0, this, SLOT(postLaunch())); } @@ -94,7 +94,7 @@ int Application::newInstance() { KUrl url = MainWindow::guessUrlFromString(args->arg(i)); newWebView(); - emit openUrl(url); + mainWindow()->loadUrl(url); } args->clear(); } @@ -135,15 +135,21 @@ void Application::slotSaveConfiguration() const } +void Application::openUrl(const KUrl &url) +{ + mainWindow()->loadUrl(url); +} + + MainWindow *Application::mainWindow() { return m_mainWindow; } -WebView *Application::newWebView(bool makeCurrent) +WebView *Application::newWebView() { - return m_mainWindow->mainView()->newWebView(makeCurrent); + return m_mainWindow->mainView()->newWebView(); } @@ -177,7 +183,7 @@ HistoryManager *Application::historyManager() DownloadManager *Application::downloadManager() { - if (!s_downloadManager) + if (!s_downloadManager) { s_downloadManager = new DownloadManager(); } |