mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Handle users joining and leaving properly in audio context and gui
Before this change signals when users were joining or leaving the voice room were not properly handled. A new signal in audio context is emitted now and gui will rebuild the user list when it is emitted.
This commit is contained in:
committed by
Klaus Basan
parent
a50e45e451
commit
0760a67138
@@ -49,9 +49,13 @@ namespace BlackCore
|
||||
m_channel1 = m_voice->createVoiceChannel();
|
||||
m_channel1->setMyAircraftCallsign(ownCallsign);
|
||||
connect(m_channel1.data(), &IVoiceChannel::connectionStatusChanged, this, &CContextAudio::ps_connectionStatusChanged);
|
||||
connect(m_channel1.data(), &IVoiceChannel::userJoinedRoom, this, &CContextAudio::ps_userJoinedRoom);
|
||||
connect(m_channel1.data(), &IVoiceChannel::userLeftRoom, this, &CContextAudio::ps_userLeftRoom);
|
||||
m_channel2 = m_voice->createVoiceChannel();
|
||||
m_channel2->setMyAircraftCallsign(ownCallsign);
|
||||
connect(m_channel2.data(), &IVoiceChannel::connectionStatusChanged, this, &CContextAudio::ps_connectionStatusChanged);
|
||||
connect(m_channel1.data(), &IVoiceChannel::userJoinedRoom, this, &CContextAudio::ps_userJoinedRoom);
|
||||
connect(m_channel1.data(), &IVoiceChannel::userLeftRoom, this, &CContextAudio::ps_userLeftRoom);
|
||||
|
||||
m_voiceInputDevice = m_voice->createInputDevice();
|
||||
m_voiceOutputDevice = m_voice->createOutputDevice();
|
||||
@@ -546,6 +550,16 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
void CContextAudio::ps_userJoinedRoom(const CCallsign & /**callsign**/)
|
||||
{
|
||||
emit this->changedVoiceRoomMembers();
|
||||
}
|
||||
|
||||
void CContextAudio::ps_userLeftRoom(const CCallsign & /**callsign**/)
|
||||
{
|
||||
emit this->changedVoiceRoomMembers();
|
||||
}
|
||||
|
||||
QSharedPointer<IVoiceChannel> CContextAudio::getVoiceChannelBy(const CVoiceRoom &voiceRoom)
|
||||
{
|
||||
QSharedPointer<IVoiceChannel> voiceChannel;
|
||||
|
||||
Reference in New Issue
Block a user