diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2013-10-25 19:58:43 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-30 12:58:06 +0100 |
commit | b5a4be09aad19f01b5d83f8674ae244f126c3d4f (patch) | |
tree | 6dac6d178b189baefde43ac631a2fbe06adb9a77 /src/widgets/widgets/qdockarealayout.cpp | |
parent | b2d3d6365edc312d18451e58e1a0b18c538b3f98 (diff) |
QDockAreaLayout: use QSignalBlocker
This change changes the point where signals are unblocked again in
QDockAreaLayoutInfo::updateTabBar() to include the final tabBar->count()
call. This should not be a problem, as count() is a const function and
thus shouldn't emit any signals.
Change-Id: I6f3dc5696a9c31db51fbe4cdee4b9d83ddeaf61f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/widgets/qdockarealayout.cpp')
-rw-r--r-- | src/widgets/widgets/qdockarealayout.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/widgets/widgets/qdockarealayout.cpp b/src/widgets/widgets/qdockarealayout.cpp index 72a463b30b..8dab6afb81 100644 --- a/src/widgets/widgets/qdockarealayout.cpp +++ b/src/widgets/widgets/qdockarealayout.cpp @@ -2096,7 +2096,7 @@ bool QDockAreaLayoutInfo::updateTabBar() const that->tabBar->setDrawBase(true); } - bool blocked = tabBar->blockSignals(true); + const QSignalBlocker blocker(tabBar); bool gap = false; int tab_idx = 0; @@ -2147,8 +2147,6 @@ bool QDockAreaLayoutInfo::updateTabBar() const tabBar->removeTab(tab_idx); } - tabBar->blockSignals(blocked); - //returns if the tabbar is visible or not return ( (gap ? 1 : 0) + tabBar->count()) > 1; } |