From ee1db27251b785d757ba4c1512972b3a5ed1eb3c Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 25 Apr 2024 14:35:00 +0200 Subject: [PATCH] FancyTabWidget: Remove an old, unnecessary hack When clicking on a mode button, the emission of `currentChanged` was delayed by an event. That was supposedly to "improve the responsiveness" of the mode bar, but I don't see any difference, and _if_ changing the mode widget was a performance issue, this wouldn't be the right place to fix or work around it. The hack creates issues, because it separates the `currentAboutToChange` and `currentChanged` signals by an event processing. Amends bd2ba2307b5695a3856c01ea478066e411ca6256 Change-Id: I53a7aa74fdcfb733a28574837ca9e95fc2e97f0b Reviewed-by: David Schulz --- src/plugins/coreplugin/fancytabwidget.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/plugins/coreplugin/fancytabwidget.cpp b/src/plugins/coreplugin/fancytabwidget.cpp index 39b0eaccb7c..05fb7e3e13f 100644 --- a/src/plugins/coreplugin/fancytabwidget.cpp +++ b/src/plugins/coreplugin/fancytabwidget.cpp @@ -196,10 +196,7 @@ void FancyTabBar::mousePressEvent(QMouseEvent *event) emit currentAboutToChange(index); m_currentIndex = index; update(); - // update tab bar before showing widget - QMetaObject::invokeMethod(this, [this] { - emit currentChanged(m_currentIndex); - }, Qt::QueuedConnection); + emit currentChanged(m_currentIndex); } } }