Utils: Prevent temporary duplicated display of InfoBar items

The delayed deletion of InfoBar items can cause short lived but visible
duplication of InfoBar entries. This change hides the obsoloete items
immediately to prevent that effect.

Fixes: QTCREATORBUG-29877
Change-Id: I6ed428185849f22f8d87f68cf1a5fac610e9dddf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2023-11-10 15:28:32 +01:00
parent 35f8f069ad
commit 218f346fcc

View File

@@ -268,6 +268,7 @@ void InfoBarDisplay::update()
{
for (QWidget *widget : std::as_const(m_infoWidgets)) {
widget->disconnect(this); // We want no destroyed() signal now
widget->hide(); // Late deletion can cause duplicate infos. Hide immediately to prevent it.
widget->deleteLater();
}
m_infoWidgets.clear();