Ref T312, added checkImpl/check in simulator listeners

This commit is contained in:
Klaus Basan
2018-08-27 14:19:32 +02:00
parent 1d7b3bd180
commit 68beaa6d9d
8 changed files with 106 additions and 36 deletions

View File

@@ -2101,6 +2101,20 @@ namespace BlackSimPlugin
m_timer.stop();
}
void CSimulatorFsxCommonListener::checkImpl()
{
if (!m_timer.isActive()) { return; }
if (this->isShuttingDown()) { return; }
m_timer.start(); // restart because we will check just now
QPointer<CSimulatorFsxCommonListener> myself(this);
QTimer::singleShot(0, this, [ = ]
{
if (!myself) { return; }
this->checkConnection();
});
}
QString CSimulatorFsxCommonListener::backendInfo() const
{
if (m_simulatorName.isEmpty()) { return ISimulatorListener::backendInfo(); }