mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
refs #308 private slot for client status changes
This commit is contained in:
@@ -313,6 +313,27 @@ namespace BlackSimPlugin
|
||||
}
|
||||
}
|
||||
|
||||
void CSimulatorFs9::ps_changeClientStatus(const QString &callsign, CFs9Client::ClientStatus status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case CFs9Client::Disconnected:
|
||||
{
|
||||
CFs9Client *client = m_hashFs9Clients.value(callsign);
|
||||
Q_ASSERT(m_fs9ClientThreads.contains(client));
|
||||
QThread *clientThread = m_fs9ClientThreads.value(client);
|
||||
|
||||
// Cleanup
|
||||
client->deleteLater();
|
||||
connect(clientThread, &QThread::finished, clientThread, &QThread::deleteLater);
|
||||
clientThread->quit();
|
||||
|
||||
m_fs9ClientThreads.remove(client);
|
||||
m_hashFs9Clients.remove(callsign);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CSimulatorFs9::ps_removeAircraft(const QString &callsign)
|
||||
{
|
||||
removeRemoteAircraft(callsign);
|
||||
|
||||
Reference in New Issue
Block a user