mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 04:25:42 +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)
|
void CSimulatorFs9::ps_removeAircraft(const QString &callsign)
|
||||||
{
|
{
|
||||||
removeRemoteAircraft(callsign);
|
removeRemoteAircraft(callsign);
|
||||||
|
|||||||
@@ -137,6 +137,8 @@ namespace BlackSimPlugin
|
|||||||
//! Change DirectPlay host status
|
//! Change DirectPlay host status
|
||||||
void ps_changeHostStatus(CFs9Host::HostStatus status);
|
void ps_changeHostStatus(CFs9Host::HostStatus status);
|
||||||
|
|
||||||
|
void ps_changeClientStatus(const QString &callsign, BlackSimPlugin::Fs9::CFs9Client::ClientStatus status);
|
||||||
|
|
||||||
//! Remove client by callsign QString
|
//! Remove client by callsign QString
|
||||||
void ps_removeAircraft(const QString &callsign);
|
void ps_removeAircraft(const QString &callsign);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user