From 2c17b1fe92148e4020fbb2ba74f5c1aa3b21428d Mon Sep 17 00:00:00 2001
From: Andrea Diamantini <adjam7@gmail.com>
Date: Tue, 2 Apr 2013 10:07:56 +0200
Subject: Fix rekonq window title update

BUG: 317062
---
 src/tabwindow/rekonqwindow.cpp | 1 +
 src/tabwindow/tabwidget.cpp    | 6 +++---
 src/tabwindow/tabwidget.h      | 1 +
 3 files changed, 5 insertions(+), 3 deletions(-)

(limited to 'src')

diff --git a/src/tabwindow/rekonqwindow.cpp b/src/tabwindow/rekonqwindow.cpp
index 0e4dfd03..e67e21c8 100644
--- a/src/tabwindow/rekonqwindow.cpp
+++ b/src/tabwindow/rekonqwindow.cpp
@@ -96,6 +96,7 @@ void RekonqWindow::init()
     
     // signals
     connect(_tabWidget, SIGNAL(closeWindow()), this, SLOT(close()));
+    connect(_tabWidget, SIGNAL(windowTitleChanged(QString)), this, SLOT(setWindowTitle(QString)));
 }
 
 // --------------------------------------------------------------------------------------------------
diff --git a/src/tabwindow/tabwidget.cpp b/src/tabwindow/tabwidget.cpp
index a7b4f2be..ceb0765b 100644
--- a/src/tabwindow/tabwidget.cpp
+++ b/src/tabwindow/tabwidget.cpp
@@ -413,8 +413,8 @@ void TabWidget::currentChanged(int newIndex)
     QString t = tab->title();
 
     (t.isEmpty() || t == QL1S("rekonq"))
-    ? setWindowTitle(QL1S("rekonq"))
-    : setWindowTitle(t + QL1S(" - rekonq"));
+    ? emit windowTitleChanged(QL1S("rekonq"))
+    : emit windowTitleChanged(t + QL1S(" - rekonq"));
 
     tab->checkFocus();
     
@@ -477,7 +477,7 @@ void TabWidget::tabTitleChanged(const QString &title)
     }
     else
     {
-        setWindowTitle(tabTitle + QL1S(" - rekonq"));
+        emit windowTitleChanged(tabTitle + QL1S(" - rekonq"));
     }
     
     if (ReKonfig::hoveringTabOption() == 1)
diff --git a/src/tabwindow/tabwidget.h b/src/tabwindow/tabwidget.h
index a6b36e33..ef9a4bea 100644
--- a/src/tabwindow/tabwidget.h
+++ b/src/tabwindow/tabwidget.h
@@ -88,6 +88,7 @@ public Q_SLOTS:
 
 Q_SIGNALS:
     void closeWindow();
+    void windowTitleChanged(QString);
     
 private:
     /**
-- 
cgit v1.2.1