Ref T592, made dock widget related slots Qt::QueuedConnection

Rational: the widget emits floating but is not yet in full floating state, so with a direct connection we deal a bit too early with the widget.
Much more stable (hopefully) using queued connection, then all the handling is done if the window is really a floating window.
This commit is contained in:
Klaus Basan
2019-04-05 02:51:00 +02:00
committed by Mat Sutcliffe
parent 423a7dc6f8
commit 9f0daa58ea
11 changed files with 27 additions and 28 deletions

View File

@@ -27,9 +27,9 @@ namespace BlackGui
ui->setupUi(this);
m_minHeightInfoArea = ui->comp_CockpitInfoArea->minimumHeight();
connect(ui->wip_CockpitComPanelShowHideBar, &CShowHideBar::toggleShowHide, this, &CCockpitComponent::onToggleShowHideDetails);
connect(ui->comp_CockpitComComponent, &CCockpitComComponent::requestCom1TextMessage, this, &CCockpitComponent::onRequestTextMessageCom1);
connect(ui->comp_CockpitComComponent, &CCockpitComComponent::requestCom2TextMessage, this, &CCockpitComponent::onRequestTextMessageCom2);
connect(ui->wip_CockpitComPanelShowHideBar, &CShowHideBar::toggleShowHide, this, &CCockpitComponent::onToggleShowHideDetails, Qt::QueuedConnection);
connect(ui->comp_CockpitComComponent, &CCockpitComComponent::requestCom1TextMessage, this, &CCockpitComponent::onRequestTextMessageCom1, Qt::QueuedConnection);
connect(ui->comp_CockpitComComponent, &CCockpitComComponent::requestCom2TextMessage, this, &CCockpitComponent::onRequestTextMessageCom2, Qt::QueuedConnection);
}
CCockpitComponent::~CCockpitComponent()
@@ -41,7 +41,7 @@ namespace BlackGui
bool ok = CEnableForDockWidgetInfoArea::setParentDockWidgetInfoArea(parentDockableWidget);
if (ok && parentDockableWidget)
{
ok = connect(parentDockableWidget, &QDockWidget::topLevelChanged, this, &CCockpitComponent::onToggleFloating);
ok = connect(parentDockableWidget, &QDockWidget::topLevelChanged, this, &CCockpitComponent::onToggleFloating, Qt::QueuedConnection);
}
return ok;
}