From 39d8fb12c1552ec708b5fc1846d7aa9828329417 Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Wed, 13 Aug 2014 22:06:28 +0200 Subject: React on the redirection signal from DolphinView to properly update the tab and window titles. REVIEW: 119697 BUG: 305721 --- src/dolphintabwidget.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/dolphintabwidget.cpp') diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp index ea71b4856..76d4b8d48 100644 --- a/src/dolphintabwidget.cpp +++ b/src/dolphintabwidget.cpp @@ -295,12 +295,19 @@ void DolphinTabWidget::tabUrlChanged(const KUrl& url) if (index >= 0) { tabBar()->setTabText(index, tabName(url)); tabBar()->setTabIcon(index, KIcon(KMimeType::iconNameForUrl(url))); + + // Emit the currentUrlChanged signal if the url of the current tab has been changed. + if (index == currentIndex()) { + emit currentUrlChanged(url); + } } } void DolphinTabWidget::currentTabChanged(int index) { - emit activeViewChanged(tabPageAt(index)->activeViewContainer()); + DolphinViewContainer* viewContainer = tabPageAt(index)->activeViewContainer(); + emit activeViewChanged(viewContainer); + emit currentUrlChanged(viewContainer->url()); } void DolphinTabWidget::tabInserted(int index) -- cgit v1.3