Change voice room callsign format to "callsign (userid)"

So far the callsign, was the callsign itself only. However, other VATSIM
clients expect it to include the user id in brackets.

ref T354
This commit is contained in:
Roland Winklmeier
2018-09-18 16:47:51 +02:00
committed by Klaus Basan
parent 89ab1a0138
commit 321c195f4b
4 changed files with 17 additions and 1 deletions

View File

@@ -310,6 +310,7 @@ namespace BlackCore
CVoiceRoom newRoomCom1 = newRooms[0];
CVoiceRoom newRoomCom2 = newRooms[1];
const CCallsign ownCallsign(this->getIContextOwnAircraft()->getOwnAircraft().getCallsign());
QString id = this->getIContextOwnAircraft()->getOwnAircraft().getPilotId();
bool changed = false;
@@ -337,6 +338,7 @@ namespace BlackCore
{
QSharedPointer<IVoiceChannel> newVoiceChannel = this->getVoiceChannelBy(newRoomCom1);
newVoiceChannel->setOwnAircraftCallsign(ownCallsign);
newVoiceChannel->setUserId(id);
bool inUse = m_voiceChannelMapping.values().contains(newVoiceChannel);
m_voiceChannelMapping.insert(BlackMisc::Aviation::CComSystem::Com1, newVoiceChannel);
@@ -377,6 +379,7 @@ namespace BlackCore
{
auto newVoiceChannel = getVoiceChannelBy(newRoomCom2);
newVoiceChannel->setOwnAircraftCallsign(ownCallsign);
newVoiceChannel->setUserId(id);
bool inUse = m_voiceChannelMapping.values().contains(newVoiceChannel);
m_voiceChannelMapping.insert(BlackMisc::Aviation::CComSystem::Com2, newVoiceChannel);