diff options
| author | Kevin Smith <git@kismith.co.uk> | 2009-11-26 09:47:08 (GMT) |
|---|---|---|
| committer | Kevin Smith <git@kismith.co.uk> | 2009-11-26 09:47:08 (GMT) |
| commit | 7b1df614ebfdbdb7d12c1d5618a74b8cdc308133 (patch) | |
| tree | 22e661f79ce1ce01321a2534d75c8cda162814b1 /Swift/QtUI/QtChatTabs.cpp | |
| parent | 5498152b4c9537742019dd45db72c88d7e3dc70c (diff) | |
| download | swift-7b1df614ebfdbdb7d12c1d5618a74b8cdc308133.zip swift-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/QtUI/QtChatTabs.cpp')
| -rw-r--r-- | Swift/QtUI/QtChatTabs.cpp | 5 |
1 files changed, 5 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 @@ -77,21 +77,26 @@ void QtChatTabs::handleTabClosing() { return; } tabs_->removeTab(index); if (tabs_->count() == 0) { hide(); } + handleTabTitleUpdated(tabs_->currentWidget()); } void QtChatTabs::handleTabCloseRequested(int index) { QWidget* widget = tabs_->widget(index); widget->close(); } void QtChatTabs::handleTabTitleUpdated() { QWidget* widget = qobject_cast<QWidget*>(sender()); + handleTabTitleUpdated(widget); +} + +void QtChatTabs::handleTabTitleUpdated(QWidget* widget) { if (!widget) { return; } int index = tabs_->indexOf(widget); if (index < 0) { return; |
Swift