mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
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:
committed by
Mat Sutcliffe
parent
423a7dc6f8
commit
9f0daa58ea
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user