mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Ref T232, some (dispatch) timer code was duplicated
* fixed a bug, where a non existing timer was killed * unified code in base class
This commit is contained in:
@@ -144,7 +144,7 @@ namespace BlackSimPlugin
|
||||
m_fsuipc->connect(); // connect FSUIPC too
|
||||
}
|
||||
initSimulatorInternals();
|
||||
m_dispatchTimerId = startTimer(50);
|
||||
m_timerId = startTimer(50);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -154,8 +154,7 @@ namespace BlackSimPlugin
|
||||
|
||||
// Don't forward messages when disconnected
|
||||
disconnect(m_connectionHostMessages);
|
||||
killTimer(m_dispatchTimerId);
|
||||
m_dispatchTimerId = -1;
|
||||
safeKillTimer();
|
||||
disconnectAllClients();
|
||||
|
||||
// disconnect FSUIPC and status
|
||||
|
||||
@@ -102,7 +102,6 @@ namespace BlackSimPlugin
|
||||
|
||||
QHash<BlackMisc::Aviation::CCallsign, QPointer<CFs9Client>> m_hashFs9Clients;
|
||||
QMetaObject::Connection m_connectionHostMessages;
|
||||
int m_dispatchTimerId = -1;
|
||||
bool m_simConnected = false; //!< Is simulator connected?
|
||||
QSharedPointer<CFs9Host> m_fs9Host;
|
||||
QSharedPointer<CLobbyClient> m_lobbyClient;
|
||||
|
||||
Reference in New Issue
Block a user