From a9967e200289fa50f8bfd03109a25a4544b8b59d Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Mon, 8 Apr 2019 05:02:33 +0200 Subject: [PATCH] Style --- src/blackcore/context/contextapplicationproxy.cpp | 4 ++-- src/blackcore/context/contextaudioimpl.cpp | 12 ++++++------ src/blackcore/context/contextaudioimpl.h | 2 +- src/blackinput/win/joystickwindows.cpp | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/blackcore/context/contextapplicationproxy.cpp b/src/blackcore/context/contextapplicationproxy.cpp index d5b933ca6..9701e32a2 100644 --- a/src/blackcore/context/contextapplicationproxy.cpp +++ b/src/blackcore/context/contextapplicationproxy.cpp @@ -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(); } diff --git a/src/blackcore/context/contextaudioimpl.cpp b/src/blackcore/context/contextaudioimpl.cpp index 266aa8b1c..aa8f4ae4d 100644 --- a/src/blackcore/context/contextaudioimpl.cpp +++ b/src/blackcore/context/contextaudioimpl.cpp @@ -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 voiceChannelCom1 = m_voiceChannelMapping.value(BlackMisc::Aviation::CComSystem::Com1); + if (!m_voiceChannelMapping.contains(CComSystem::Com1)) { return; } + QSharedPointer voiceChannelCom1 = m_voiceChannelMapping.value(CComSystem::Com1); IAudioMixer::OutputPort mixerOutputPort = m_voiceChannelOutputPortMapping.value(voiceChannelCom1); if (enable) { diff --git a/src/blackcore/context/contextaudioimpl.h b/src/blackcore/context/contextaudioimpl.h index 2e25143b6..0d144c84a 100644 --- a/src/blackcore/context/contextaudioimpl.h +++ b/src/blackcore/context/contextaudioimpl.h @@ -151,7 +151,7 @@ namespace BlackCore QSharedPointer m_channel1; QSharedPointer m_channel2; std::unique_ptr m_voiceOutputDevice; - std::unique_ptr m_voiceInputDevice; + std::unique_ptr m_voiceInputDevice; QList> m_unusedVoiceChannels; QHash> m_voiceChannelMapping; diff --git a/src/blackinput/win/joystickwindows.cpp b/src/blackinput/win/joystickwindows.cpp index c4e87c4d2..febe328b0 100644 --- a/src/blackinput/win/joystickwindows.cpp +++ b/src/blackinput/win/joystickwindows.cpp @@ -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); }