diff options
author | Tobias Markmann <tm@ayena.de> | 2015-02-23 12:09:55 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2015-02-23 12:09:55 (GMT) |
commit | e963c5e939f4e1b7cd8f8d653ec2d1cadbec4a8d (patch) | |
tree | ec2c5b9faa0e6f9c647f11722c0865f8b4bb1dd8 /Swift/QtUI/QtChatTabs.cpp | |
parent | 8718d29202d5df23cd979055b8be8a2d28d82301 (diff) | |
download | swift-e963c5e939f4e1b7cd8f8d653ec2d1cadbec4a8d.zip swift-e963c5e939f4e1b7cd8f8d653ec2d1cadbec4a8d.tar.bz2 |
Fix chat window title showing wrong chat titleswift-3.0beta1
Setup an application wide focus handler which updates the title if a
focus change to a QtTabWidget happened.
Test-Information:
Tested on OS X 10.9.5 with Qt 5.4.0.
Change-Id: Ib2e2f4c4a93deddb286350bdef685eb7aee504c9
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 60ffbea..e869028 100644 --- a/Swift/QtUI/QtChatTabs.cpp +++ b/Swift/QtUI/QtChatTabs.cpp @@ -40,6 +40,7 @@ QtChatTabs::QtChatTabs(bool singleWindow, SettingsProvider* settingsProvider, bo #endif dynamicGrid_ = new QtDynamicGridLayout(this, trellisMode); connect(dynamicGrid_, SIGNAL(tabCloseRequested(int)), this, SLOT(handleTabCloseRequested(int))); + connect(dynamicGrid_, SIGNAL(onCurrentIndexChanged(int)), this, SLOT(handleCurrentTabIndexChanged(int))); QVBoxLayout *layout = new QVBoxLayout; layout->setSpacing(0); @@ -172,6 +173,10 @@ void QtChatTabs::handleWidgetShown() { show(); } +void QtChatTabs::handleCurrentTabIndexChanged(int newIndex) { + handleTabTitleUpdated(dynamicGrid_->widget(newIndex)); +} + void QtChatTabs::handleWantsToActivate() { QtTabbable* widget = qobject_cast<QtTabbable*>(sender()); Q_ASSERT(widget); |