refactor: Fix clang-tidy warnings

This commit is contained in:
Lars Toenning
2024-12-30 09:33:23 +01:00
parent 74d87fab82
commit 51ae5805b2
3 changed files with 32 additions and 31 deletions

View File

@@ -23,7 +23,6 @@
#include "misc/audio/audiosettings.h" #include "misc/audio/audiosettings.h"
#include "misc/aviation/comsystem.h" #include "misc/aviation/comsystem.h"
#include "misc/identifiable.h" #include "misc/identifiable.h"
#include "misc/logcategories.h"
#include "misc/settingscache.h" #include "misc/settingscache.h"
#include "misc/worker.h" #include "misc/worker.h"
#include "sound/sampleprovider/volumesampleprovider.h" #include "sound/sampleprovider/volumesampleprovider.h"
@@ -61,7 +60,19 @@ namespace swift::core::afv::clients
CAfvClient(const QString &apiServer, QObject *owner); CAfvClient(const QString &apiServer, QObject *owner);
//! Dtor //! Dtor
virtual ~CAfvClient() override { this->stopAudio(); } ~CAfvClient() override { this->stopAudio(); }
//! @{
//! Copy operations
CAfvClient(const CAfvClient &) = delete;
CAfvClient &operator=(const CAfvClient &) = delete;
//! }@
//! @{
//! Move operations
CAfvClient(const CAfvClient &&) = delete;
CAfvClient &operator=(const CAfvClient &&) = delete;
//! }@
//! @{ //! @{
//! Corresponding callsign //! Corresponding callsign
@@ -311,10 +322,10 @@ namespace swift::core::afv::clients
protected: protected:
//! \copydoc swift::misc::CContinuousWorker::initialize //! \copydoc swift::misc::CContinuousWorker::initialize
virtual void initialize() override; void initialize() override;
//! \copydoc swift::misc::CContinuousWorker::cleanup //! \copydoc swift::misc::CContinuousWorker::cleanup
virtual void cleanup() override; void cleanup() override;
private: private:
void opusDataAvailable(const audio::OpusDataAvailableArgs &args); // threadsafe void opusDataAvailable(const audio::OpusDataAvailableArgs &args); // threadsafe

View File

@@ -26,7 +26,6 @@
#include "misc/identifiable.h" #include "misc/identifiable.h"
#include "misc/identifier.h" #include "misc/identifier.h"
#include "misc/input/actionhotkeydefs.h" #include "misc/input/actionhotkeydefs.h"
#include "misc/macos/microphoneaccess.h"
#include "misc/network/connectionstatus.h" #include "misc/network/connectionstatus.h"
#include "misc/network/userlist.h" #include "misc/network/userlist.h"
#include "misc/simplecommandparser.h" #include "misc/simplecommandparser.h"
@@ -73,7 +72,7 @@ namespace swift::core
static const QString &ObjectPath(); static const QString &ObjectPath();
//! \copydoc IContext::getPathAndContextId() //! \copydoc IContext::getPathAndContextId()
virtual QString getPathAndContextId() const override { return this->buildPathAndContextId(ObjectPath()); } QString getPathAndContextId() const override { return this->buildPathAndContextId(ObjectPath()); }
//! Factory method //! Factory method
static IContextAudio *create(CCoreFacade *runtime, CCoreFacadeConfig::ContextMode mode, static IContextAudio *create(CCoreFacade *runtime, CCoreFacadeConfig::ContextMode mode,
@@ -96,7 +95,7 @@ namespace swift::core
//! Unregister devices //! Unregister devices
virtual void unRegisterDevices(const swift::misc::audio::CAudioDeviceInfoList &devices) = 0; virtual void unRegisterDevices(const swift::misc::audio::CAudioDeviceInfoList &devices) = 0;
//! Remove all devices for identifer (i.e. "a machine") //! Remove all devices for identifier (i.e. "a machine")
virtual void unRegisterDevicesFor(const swift::misc::CIdentifier &identifier) = 0; virtual void unRegisterDevicesFor(const swift::misc::CIdentifier &identifier) = 0;
//! Register an audio callsign (used with AFV) //! Register an audio callsign (used with AFV)
@@ -135,7 +134,19 @@ namespace swift::core
public: public:
//! Destructor //! Destructor
virtual ~CContextAudioBase() override; ~CContextAudioBase() override;
//! @{
//! Copy operations
CContextAudioBase(const CContextAudioBase &) = delete;
CContextAudioBase &operator=(const CContextAudioBase &) = delete;
//! @}
//! @{
//! Move operations
CContextAudioBase(CContextAudioBase &&) = delete;
CContextAudioBase &operator=(CContextAudioBase &&) = delete;
//! @}
//! Graceful shutdown //! Graceful shutdown
void gracefulShutdown(); void gracefulShutdown();
@@ -209,7 +220,7 @@ namespace swift::core
bool isAudioStarted() const; bool isAudioStarted() const;
//! Is audio enabled? //! Is audio enabled?
bool isAudioEnabled() const { return m_voiceClient; } bool isAudioEnabled() const { return m_voiceClient != nullptr; }
//! Integrated with COM unit? //! Integrated with COM unit?
bool isComUnitIntegrated() const; bool isComUnitIntegrated() const;
@@ -248,8 +259,7 @@ namespace swift::core
//! .unmute unmute swift::core::context::CContextAudioBase //! .unmute unmute swift::core::context::CContextAudioBase
//! .vol .volume volume 0..100 set volume swift::core::context::CContextAudioBase //! .vol .volume volume 0..100 set volume swift::core::context::CContextAudioBase
//! </pre> //! </pre>
virtual bool parseCommandLine(const QString &commandLine, bool parseCommandLine(const QString &commandLine, const swift::misc::CIdentifier &originator) override;
const swift::misc::CIdentifier &originator) override;
//! \endcond //! \endcond
// ------------- DBus --------------- // ------------- DBus ---------------
@@ -276,25 +286,6 @@ namespace swift::core
//! PTT in voice client received //! PTT in voice client received
void ptt(bool active, const swift::misc::CIdentifier &identifier); void ptt(bool active, const swift::misc::CIdentifier &identifier);
/*
* Workaround those must be invisible for DBus
*
//! @{
//! VU levels
void inputVolumePeakVU (double value);
void outputVolumePeakVU(double value);
//! @}
//! Callsigns I receive have changed
void receivingCallsignsChanged(const swift::core::afv::audio::TransceiverReceivingCallsignsChangedArgs
&args);
//! Client updated from own aicraft data
void updatedFromOwnAircraftCockpit();
* end workaround */
// ------------ local signals ------- // ------------ local signals -------
private: private:

View File

@@ -196,7 +196,6 @@ namespace swift::misc
QDBusConnection::RegisterOptions CDBusServer::registerOptions() QDBusConnection::RegisterOptions CDBusServer::registerOptions()
{ {
return QDBusConnection::ExportAdaptors | QDBusConnection::ExportAllSignals | QDBusConnection::ExportAllSlots; return QDBusConnection::ExportAdaptors | QDBusConnection::ExportAllSignals | QDBusConnection::ExportAllSlots;
// return QDBusConnection::ExportAllContents;
} }
bool CDBusServer::registerObjectsWithP2PConnection(QDBusConnection connection) bool CDBusServer::registerObjectsWithP2PConnection(QDBusConnection connection)