diff --git a/src/widgets/widgets/qmdiarea.cpp b/src/widgets/widgets/qmdiarea.cpp index 5c1d7a6c052..ea33f40806e 100644 --- a/src/widgets/widgets/qmdiarea.cpp +++ b/src/widgets/widgets/qmdiarea.cpp @@ -1120,10 +1120,9 @@ void QMdiAreaPrivate::updateActiveWindow(int removedIndex, bool activeRemoved) #ifndef QT_NO_TABBAR if (tabBar && removedIndex >= 0) { - tabBar->blockSignals(true); + const QSignalBlocker blocker(tabBar); tabBar->removeTab(removedIndex); updateTabBarGeometry(); - tabBar->blockSignals(false); } #endif