diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-07-24 02:20:44 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-07-24 02:20:44 +0200 |
commit | c3ff1138d5d62e7092abb9d66f7f26097014f6e8 (patch) | |
tree | 096c858597df0470d8914f14c322f8037f57b48d /src/mainwindow.cpp | |
parent | Removed rekonqrun class and provided slots in Application one. (diff) | |
download | rekonq-c3ff1138d5d62e7092abb9d66f7f26097014f6e8.tar.xz |
Big Big Big Commit!
Refactored loadUrl code to divide UI classes from WEB classes.
We now have two loadUrl methods in the Application class to load
(hopefully) every kind of (k)url..
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ef51e1e0..09c36263 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -177,7 +177,7 @@ void MainWindow::postLaunch() connect(m_findBar, SIGNAL(searchString(const QString &)), this, SLOT(slotFind(const QString &))); // bookmarks loading - connect(Application::bookmarkProvider(), SIGNAL(openUrl(const KUrl&)), this, SLOT(loadUrl(const KUrl&))); + connect(Application::bookmarkProvider(), SIGNAL(openUrl(const KUrl&)), Application::instance(), SLOT(loadUrl(const KUrl&))); // setting up toolbars to NOT have context menu enabled setContextMenuPolicy(Qt::DefaultContextMenu); @@ -350,7 +350,7 @@ void MainWindow::setupSidePanel() { // Setup history side panel m_sidePanel = new SidePanel(i18n("History"), this); - connect(m_sidePanel, SIGNAL(openUrl(const KUrl&)), this, SLOT(loadUrl(const KUrl&))); + connect(m_sidePanel, SIGNAL(openUrl(const KUrl&)), Application::instance(), SLOT(loadUrl(const KUrl&))); connect(m_sidePanel, SIGNAL(destroyed()), Application::instance(), SLOT(slotSaveConfiguration())); addDockWidget(Qt::LeftDockWidgetArea, m_sidePanel); @@ -367,7 +367,7 @@ void MainWindow::setupSidePanel() void MainWindow::setupHistoryMenu() { HistoryMenu *historyMenu = new HistoryMenu(this); - connect(historyMenu, SIGNAL(openUrl(const KUrl&)), this, SLOT(loadUrl(const KUrl&))); + connect(historyMenu, SIGNAL(openUrl(const KUrl&)), Application::instance(), SLOT(loadUrl(const KUrl&))); historyMenu->setTitle(i18n("&History")); // setting history menu position @@ -445,12 +445,6 @@ void MainWindow::slotUpdateBrowser() } -void MainWindow::loadUrl(const KUrl &url) -{ - m_view->loadUrl(url); -} - - void MainWindow::slotOpenLocation() { m_view->currentUrlBar()->selectAll(); @@ -725,7 +719,7 @@ void MainWindow::slotViewPageSource() void MainWindow::slotHome() { - loadUrl(KUrl(m_homePage)); + Application::instance()->loadUrl(KUrl(m_homePage)); } |