Ref T786, make sure callbacks are called in correct thread

* callback.singleShot
* shutdown guards, "myself"
* BLACK_VERIFY
* Qt::QueuedConnection
This commit is contained in:
Klaus Basan
2020-04-18 02:42:25 +02:00
committed by Mat Sutcliffe
parent fbf63457c1
commit 3be498a347
5 changed files with 37 additions and 18 deletions

View File

@@ -104,7 +104,7 @@ namespace BlackGui
// here I know I am the selected widget, update, but keep GUI responsive (-> timer)
//QTimer::singleShot(1000, this, &CWeatherComponent::update);
Q_UNUSED(index);
Q_UNUSED(index)
}
void CWeatherComponent::toggleUseOwnAircraftPosition(bool useOwnAircraftPosition)
@@ -243,7 +243,7 @@ namespace BlackGui
// Context connections
Q_ASSERT(sGui->getIContextSimulator());
connect(sGui->getIContextSimulator(), &IContextSimulator::weatherGridReceived, this, &CWeatherComponent::weatherGridReceived);
connect(sGui->getIContextSimulator(), &IContextSimulator::weatherGridReceived, this, &CWeatherComponent::weatherGridReceived, Qt::QueuedConnection);
}
void CWeatherComponent::setWeatherGrid(const CWeatherGrid &weatherGrid)