summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/application.cpp2
-rw-r--r--src/mainview.cpp10
-rw-r--r--src/mainview.h13
-rw-r--r--src/mainwindow.cpp4
-rw-r--r--src/protocolhandler.cpp2
-rw-r--r--src/webview.cpp2
6 files changed, 17 insertions, 16 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 2efb62c0..95aa9cf0 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -439,7 +439,7 @@ void Application::loadResolvedUrl(ThreadWeaver::Job *job)
void Application::newWindow()
{
loadUrl(KUrl("about:home"), Rekonq::NewWindow);
- mainWindow()->mainView()->urlBar()->setFocus();
+ mainWindow()->mainView()->currentUrlBar()->setFocus();
}
diff --git a/src/mainview.cpp b/src/mainview.cpp
index beaf4e21..26248da5 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -169,9 +169,9 @@ TabBar *MainView::tabBar() const
}
-UrlBar *MainView::urlBar() const
+UrlBar *MainView::currentUrlBar() const
{
- return _widgetBar->urlBar(m_currentTabIndex);
+ return webTab(currentIndex())->urlBar();
}
@@ -355,7 +355,7 @@ void MainView::newTab()
w->load(KUrl("about:home"));
break;
case 1: // blank page
- urlBar()->clear();
+ currentUrlBar()->clear();
break;
case 2: // homepage
w->load(KUrl(ReKonfig::homePage()));
@@ -363,7 +363,7 @@ void MainView::newTab()
default:
break;
}
- urlBar()->setFocus();
+ currentUrlBar()->setFocus();
}
@@ -450,7 +450,7 @@ void MainView::closeTab(int index, bool del)
case 0: // new tab page
case 1: // blank page
w->load(KUrl("about:home"));
- urlBar()->setFocus();
+ currentUrlBar()->setFocus();
break;
case 2: // homepage
w->load(KUrl(ReKonfig::homePage()));
diff --git a/src/mainview.h b/src/mainview.h
index 29162dd1..3ee688e2 100644
--- a/src/mainview.h
+++ b/src/mainview.h
@@ -69,11 +69,12 @@ public:
~MainView();
inline StackedUrlBar *widgetBar() const { return _widgetBar; }
- UrlBar *urlBar() const;
- WebTab *webTab(int index) const;
-
TabBar *tabBar() const;
+
WebTab *currentWebTab() const;
+ UrlBar *currentUrlBar() const;
+
+ WebTab *webTab(int index) const;
/**
* show and hide TabBar if user doesn't choose
@@ -97,7 +98,7 @@ public:
inline QList<HistoryItem> recentlyClosedTabs() { return m_recentlyClosedTabs; }
-signals:
+Q_SIGNALS:
// tab widget signals
void tabsChanged();
void lastTabClosed();
@@ -110,7 +111,7 @@ signals:
void printRequested(QWebFrame *frame);
-public slots:
+public Q_SLOTS:
/**
* Core browser slot. This create a new tab with a WebView inside
* for browsing and follows rekonq settings about opening there a
@@ -143,7 +144,7 @@ public slots:
void webReload();
void webStop();
-private slots:
+private Q_SLOTS:
void currentChanged(int index);
void webViewLoadStarted();
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index d5f82d97..5f508506 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -591,8 +591,8 @@ void MainWindow::openLocation()
{
setWidgetsVisible(true);
}
- m_view->urlBar()->selectAll();
- m_view->urlBar()->setFocus();
+ m_view->currentUrlBar()->selectAll();
+ m_view->currentUrlBar()->setFocus();
}
diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp
index a29ff366..00d97f54 100644
--- a/src/protocolhandler.cpp
+++ b/src/protocolhandler.cpp
@@ -271,7 +271,7 @@ void ProtocolHandler::showResults(const KFileItemList &list)
_frame->setHtml(html);
qobject_cast<WebPage *>(_frame->page())->setIsOnRekonqPage(true);
- Application::instance()->mainWindow()->mainView()->urlBar()->setQUrl(_url);
+ Application::instance()->mainWindow()->mainView()->currentUrlBar()->setQUrl(_url);
Application::instance()->mainWindow()->currentTab()->setFocus();
Application::historyManager()->addHistoryEntry(_url.prettyUrl());
}
diff --git a/src/webview.cpp b/src/webview.cpp
index 8be744ad..978181a5 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -413,7 +413,7 @@ void WebView::mouseMoveEvent(QMouseEvent *event)
}
else
{
- if(!w->mainView()->urlBar()->hasFocus())
+ if(!w->mainView()->currentUrlBar()->hasFocus())
w->setWidgetsVisible(false);
}
}