mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Style
This commit is contained in:
committed by
Mat Sutcliffe
parent
5e32064d21
commit
a9967e2002
@@ -251,9 +251,9 @@ namespace BlackCore
|
||||
return ok;
|
||||
}
|
||||
|
||||
void CContextApplicationProxy::processRemoteHotkeyActionCall(const QString &action, bool argument, const BlackMisc::CIdentifier &origin)
|
||||
void CContextApplicationProxy::processRemoteHotkeyActionCall(const QString &action, bool argument, const CIdentifier &origin)
|
||||
{
|
||||
if (origin.isFromLocalMachine()) { return; }
|
||||
if (!sApp || origin.isFromLocalMachine()) { return; }
|
||||
sApp->getInputManager()->callFunctionsBy(action, argument);
|
||||
CLogMessage(this, CLogCategory::contextSlot()).debug() << "Calling function" << action << "from origin" << origin.getMachineName();
|
||||
}
|
||||
|
||||
@@ -56,12 +56,12 @@ namespace BlackCore
|
||||
//! \todo KB 2018-11 those are supposed to be Qt::QueuedConnection, but not yet changed (risk to break something)
|
||||
m_channel1 = m_voice->createVoiceChannel();
|
||||
connect(m_channel1.data(), &IVoiceChannel::connectionStatusChanged, this, &CContextAudio::onConnectionStatusChanged);
|
||||
connect(m_channel1.data(), &IVoiceChannel::userJoinedRoom, this, &CContextAudio::onUserJoinedRoom);
|
||||
connect(m_channel1.data(), &IVoiceChannel::userLeftRoom, this, &CContextAudio::onUserLeftRoom);
|
||||
connect(m_channel1.data(), &IVoiceChannel::userJoinedRoom, this, &CContextAudio::onUserJoinedRoom);
|
||||
connect(m_channel1.data(), &IVoiceChannel::userLeftRoom, this, &CContextAudio::onUserLeftRoom);
|
||||
m_channel2 = m_voice->createVoiceChannel();
|
||||
connect(m_channel2.data(), &IVoiceChannel::connectionStatusChanged, this, &CContextAudio::onConnectionStatusChanged);
|
||||
connect(m_channel2.data(), &IVoiceChannel::userJoinedRoom, this, &CContextAudio::onUserJoinedRoom);
|
||||
connect(m_channel2.data(), &IVoiceChannel::userLeftRoom, this, &CContextAudio::onUserLeftRoom);
|
||||
connect(m_channel2.data(), &IVoiceChannel::userJoinedRoom, this, &CContextAudio::onUserJoinedRoom);
|
||||
connect(m_channel2.data(), &IVoiceChannel::userLeftRoom, this, &CContextAudio::onUserLeftRoom);
|
||||
|
||||
m_voiceInputDevice = m_voice->createInputDevice();
|
||||
m_voiceOutputDevice = m_voice->createOutputDevice();
|
||||
@@ -523,8 +523,8 @@ namespace BlackCore
|
||||
void CContextAudio::setVoiceTransmission(bool enable)
|
||||
{
|
||||
// FIXME: Use the 'active' channel instead of hardcoded COM1
|
||||
if (!m_voiceChannelMapping.contains(BlackMisc::Aviation::CComSystem::Com1)) { return; }
|
||||
QSharedPointer<IVoiceChannel> voiceChannelCom1 = m_voiceChannelMapping.value(BlackMisc::Aviation::CComSystem::Com1);
|
||||
if (!m_voiceChannelMapping.contains(CComSystem::Com1)) { return; }
|
||||
QSharedPointer<IVoiceChannel> voiceChannelCom1 = m_voiceChannelMapping.value(CComSystem::Com1);
|
||||
IAudioMixer::OutputPort mixerOutputPort = m_voiceChannelOutputPortMapping.value(voiceChannelCom1);
|
||||
if (enable)
|
||||
{
|
||||
|
||||
@@ -151,7 +151,7 @@ namespace BlackCore
|
||||
QSharedPointer<IVoiceChannel> m_channel1;
|
||||
QSharedPointer<IVoiceChannel> m_channel2;
|
||||
std::unique_ptr<IAudioOutputDevice> m_voiceOutputDevice;
|
||||
std::unique_ptr<IAudioInputDevice> m_voiceInputDevice;
|
||||
std::unique_ptr<IAudioInputDevice> m_voiceInputDevice;
|
||||
|
||||
QList<QSharedPointer<IVoiceChannel>> m_unusedVoiceChannels;
|
||||
QHash<BlackMisc::Aviation::CComSystem::ComUnit, QSharedPointer<IVoiceChannel>> m_voiceChannelMapping;
|
||||
|
||||
@@ -339,7 +339,7 @@ namespace BlackInput
|
||||
|
||||
void CJoystickWindows::joystickButtonChanged(const CJoystickButton &joystickButton, bool isPressed)
|
||||
{
|
||||
BlackMisc::Input::CHotkeyCombination oldCombination(m_buttonCombination);
|
||||
CHotkeyCombination oldCombination(m_buttonCombination);
|
||||
if (isPressed) { m_buttonCombination.addJoystickButton(joystickButton); }
|
||||
else { m_buttonCombination.removeJoystickButton(joystickButton); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user