mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
Ref T730, directly use context from sApp
* using sApp->getIContextOwnAircraft() * no need to pass context, avoid issues when shutting down * minor style changes
This commit is contained in:
committed by
Mat Sutcliffe
parent
99edc9cb13
commit
66b02e61c5
@@ -778,12 +778,11 @@ namespace BlackCore
|
||||
|
||||
void CContextAudio::xCtxNetworkConnectionStatusChanged(const CConnectionStatus &from, const CConnectionStatus &to)
|
||||
{
|
||||
Q_UNUSED(from);
|
||||
Q_UNUSED(from)
|
||||
BLACK_VERIFY_X(this->getIContextNetwork(), Q_FUNC_INFO, "Missing network context");
|
||||
if (to.isConnected() && this->getIContextNetwork())
|
||||
{
|
||||
CUser connectedUser = this->getIContextNetwork()->getConnectedServer().getUser();
|
||||
m_voiceClient.setContextOwnAircraft(getIContextOwnAircraft());
|
||||
const CUser connectedUser = this->getIContextNetwork()->getConnectedServer().getUser();
|
||||
m_voiceClient.connectTo(connectedUser.getId(), connectedUser.getPassword(), connectedUser.getCallsign().asString());
|
||||
m_voiceClient.start(QAudioDeviceInfo::defaultInputDevice(), QAudioDeviceInfo::defaultOutputDevice(), {0, 1});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user