summaryrefslogtreecommitdiff
path: root/src/tabwindow/tabwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tabwindow/tabwindow.cpp')
-rw-r--r--src/tabwindow/tabwindow.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tabwindow/tabwindow.cpp b/src/tabwindow/tabwindow.cpp
index 47b3f254..2ade757b 100644
--- a/src/tabwindow/tabwindow.cpp
+++ b/src/tabwindow/tabwindow.cpp
@@ -275,6 +275,7 @@ WebWindow *TabWindow::prepareNewTab(WebPage *page)
WebWindow *tab = new WebWindow(this, _isPrivateBrowsing, page);
connect(tab, SIGNAL(titleChanged(QString)), this, SLOT(tabTitleChanged(QString)));
+ connect(tab, SIGNAL(urlChanged(QUrl)), this, SLOT(tabUrlChanged(QUrl)));
connect(tab, SIGNAL(iconChanged()), this, SLOT(tabIconChanged()));
connect(tab, SIGNAL(loadStarted()), this, SLOT(tabLoadStarted()));
@@ -444,6 +445,21 @@ void TabWindow::tabTitleChanged(const QString &title)
{
setWindowTitle(tabTitle + QL1S(" - rekonq"));
}
+
+ if (ReKonfig::hoveringTabOption() == 1)
+ tabBar()->setTabToolTip(index, tabTitle.remove('&'));
+}
+
+
+void TabWindow::tabUrlChanged(const QUrl &url)
+{
+ WebWindow *tab = qobject_cast<WebWindow *>(sender());
+ if (!tab)
+ return;
+
+ int index = indexOf(tab);
+ if (ReKonfig::hoveringTabOption() == 2)
+ tabBar()->setTabToolTip(index, url.toString());
}