summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-04-29 01:41:58 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-04-29 01:41:58 +0200
commit5fb7d909e87be4ea5a07b7a29271c96b7db4a9b3 (patch)
tree66446357b150a6aa5e675ec75b65973787fb3ad7 /src/mainwindow.cpp
parentRemoved loadUrl method from WebView (diff)
downloadrekonq-5fb7d909e87be4ea5a07b7a29271c96b7db4a9b3.tar.xz
Fixed loading Url methods.
Now in all rekonq code we have just a loadUrl method in mainview (doing the dirty job) and one in mainwindow, provided for convenience. Every class needing loading an url has a openUrl signal. Hope this should go well..
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 827f10c1..56ae108e 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -331,7 +331,7 @@ void MainWindow::setupSidePanel()
void MainWindow::setupHistoryMenu()
{
HistoryMenu *historyMenu = new HistoryMenu(this);
- connect(historyMenu, SIGNAL(openUrl(const KUrl&)), m_view, SLOT(loadUrlInCurrentTab(const KUrl&)));
+ connect(historyMenu, SIGNAL(openUrl(const KUrl&)), this, SLOT(loadUrl(const KUrl&)));
connect(historyMenu, SIGNAL(hovered(const QString&)), this, SLOT(slotUpdateStatusbar(const QString&)));
historyMenu->setTitle(i18n("&History"));
@@ -455,11 +455,7 @@ KUrl MainWindow::guessUrlFromString(const QString &string)
void MainWindow::loadUrl(const KUrl &url)
{
- if (!currentTab() || url.isEmpty())
- return;
-
- m_view->currentUrlBar()->setUrl(url.prettyUrl());
- m_view->loadUrlInCurrentTab(url);
+ m_view->loadUrl(url);
}