summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-11-26 09:47:08 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-11-26 09:47:08 (GMT)
commit7b1df614ebfdbdb7d12c1d5618a74b8cdc308133 (patch)
tree22e661f79ce1ce01321a2534d75c8cda162814b1 /Swift
parent5498152b4c9537742019dd45db72c88d7e3dc70c (diff)
downloadswift-contrib-7b1df614ebfdbdb7d12c1d5618a74b8cdc308133.zip
swift-contrib-7b1df614ebfdbdb7d12c1d5618a74b8cdc308133.tar.bz2
Make sure window title's update on tab close.
This is a speculative fix for a problem that I couldn't reproduce but was hitting Steve reproducably. This should ensure that whenever a tab is closed, it'll cause the title to be updated.
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/QtChatTabs.cpp5
-rw-r--r--Swift/QtUI/QtChatTabs.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatTabs.cpp b/Swift/QtUI/QtChatTabs.cpp
index e30478c..f9a42a4 100644
--- a/Swift/QtUI/QtChatTabs.cpp
+++ b/Swift/QtUI/QtChatTabs.cpp
@@ -80,6 +80,7 @@ void QtChatTabs::handleTabClosing() {
if (tabs_->count() == 0) {
hide();
}
+ handleTabTitleUpdated(tabs_->currentWidget());
}
void QtChatTabs::handleTabCloseRequested(int index) {
@@ -89,6 +90,10 @@ void QtChatTabs::handleTabCloseRequested(int index) {
void QtChatTabs::handleTabTitleUpdated() {
QWidget* widget = qobject_cast<QWidget*>(sender());
+ handleTabTitleUpdated(widget);
+}
+
+void QtChatTabs::handleTabTitleUpdated(QWidget* widget) {
if (!widget) {
return;
}
diff --git a/Swift/QtUI/QtChatTabs.h b/Swift/QtUI/QtChatTabs.h
index feb8ebc..c51b88d 100644
--- a/Swift/QtUI/QtChatTabs.h
+++ b/Swift/QtUI/QtChatTabs.h
@@ -24,6 +24,7 @@ namespace Swift {
private slots:
void handleTabClosing();
void handleTabTitleUpdated();
+ void handleTabTitleUpdated(QWidget* widget);
void handleTabCloseRequested(int index);
void handleWidgetShown();
void handleWantsToActivate();