Skip to content

Commit

Permalink
Merge pull request #4636 from Holzhaus/clazy-fixes
Browse files Browse the repository at this point in the history
Clazy fixes
  • Loading branch information
uklotzde committed Jan 19, 2022
2 parents 1d42f55 + c4cfc8f commit b0f19c3
Show file tree
Hide file tree
Showing 36 changed files with 97 additions and 64 deletions.
1 change: 1 addition & 0 deletions src/control/control.h
Expand Up @@ -209,6 +209,7 @@ class ControlDoublePrivate : public QObject {
/// The constant ControlDoublePrivate version is used as dummy for default
/// constructed control objects
class ControlDoublePrivateConst : public ControlDoublePrivate {
Q_OBJECT
public:
~ControlDoublePrivateConst() override = default;

Expand Down
1 change: 1 addition & 0 deletions src/controllers/bulk/bulkenumerator.h
Expand Up @@ -6,6 +6,7 @@ struct libusb_context;

/// Locate supported USB bulk controllers
class BulkEnumerator : public ControllerEnumerator {
Q_OBJECT
public:
explicit BulkEnumerator(UserSettingsPointer pConfig);
virtual ~BulkEnumerator();
Expand Down
1 change: 1 addition & 0 deletions src/controllers/delegates/midibytedelegate.h
Expand Up @@ -3,6 +3,7 @@
#include <QStyledItemDelegate>

class MidiByteDelegate : public QStyledItemDelegate {
Q_OBJECT
public:
MidiByteDelegate(QObject* pParent);
virtual ~MidiByteDelegate();
Expand Down
1 change: 1 addition & 0 deletions src/controllers/delegates/midichanneldelegate.h
Expand Up @@ -3,6 +3,7 @@
#include <QStyledItemDelegate>

class MidiChannelDelegate : public QStyledItemDelegate {
Q_OBJECT
public:
MidiChannelDelegate(QObject* pParent);
virtual ~MidiChannelDelegate();
Expand Down
1 change: 1 addition & 0 deletions src/controllers/delegates/midiopcodedelegate.h
Expand Up @@ -3,6 +3,7 @@
#include <QStyledItemDelegate>

class MidiOpCodeDelegate : public QStyledItemDelegate {
Q_OBJECT
public:
MidiOpCodeDelegate(QObject* pParent);
virtual ~MidiOpCodeDelegate();
Expand Down
1 change: 1 addition & 0 deletions src/controllers/hid/hidenumerator.h
Expand Up @@ -5,6 +5,7 @@
/// This class handles discovery and enumeration of DJ controllers that use the
/// USB-HID protocol.
class HidEnumerator : public ControllerEnumerator {
Q_OBJECT
public:
HidEnumerator() = default;
~HidEnumerator() override;
Expand Down
5 changes: 3 additions & 2 deletions src/effects/backends/effectmanifestparameter.h
Expand Up @@ -7,6 +7,7 @@

#include "effects/defs.h"
#include "util/assert.h"
#include "util/compatibility/qhash.h"

class EffectManifestParameter;
typedef QSharedPointer<EffectManifestParameter> EffectManifestParameterPointer;
Expand Down Expand Up @@ -277,6 +278,6 @@ QDebug operator<<(QDebug dbg, const EffectManifestParameter& parameter);

typedef EffectManifestParameter::ParameterType EffectParameterType;

inline uint qHash(const EffectParameterType& parameterType) {
return static_cast<uint>(parameterType);
inline qhash_seed_t qHash(const EffectParameterType& parameterType) {
return static_cast<qhash_seed_t>(parameterType);
}
1 change: 1 addition & 0 deletions src/effects/chains/equalizereffectchain.h
Expand Up @@ -9,6 +9,7 @@
/// EqualizerEffectChain is hardwired to one input channel, always
/// enabled, and has the mix knob fully enabled.
class EqualizerEffectChain : public PerGroupEffectChain {
Q_OBJECT
public:
EqualizerEffectChain(const QString& group,
EffectsManager* pEffectsManager,
Expand Down
1 change: 1 addition & 0 deletions src/effects/chains/outputeffectchain.h
Expand Up @@ -5,6 +5,7 @@
/// OutputEffectChain is hardwired to only one of Mixxx's outputs.
/// This is used for the main mix equalizer.
class OutputEffectChain : public EffectChain {
Q_OBJECT
public:
OutputEffectChain(EffectsManager* pEffectsManager,
EffectsMessengerPointer pEffectsMessenger);
Expand Down
1 change: 1 addition & 0 deletions src/effects/chains/pergroupeffectchain.h
Expand Up @@ -5,6 +5,7 @@
/// PerGroupEffectChain is a base class hardwired for one input channel.
/// The routing switches are not presented to the user.
class PerGroupEffectChain : public EffectChain {
Q_OBJECT
public:
PerGroupEffectChain(const QString& group,
const QString& chainSlotGroup,
Expand Down
1 change: 1 addition & 0 deletions src/effects/chains/quickeffectchain.h
Expand Up @@ -8,6 +8,7 @@
/// then load it into QuickEffectChain. QuickEffectChain is hardwired to one
/// input channel with the mix knob fully enabled.
class QuickEffectChain : public PerGroupEffectChain {
Q_OBJECT
public:
QuickEffectChain(const QString& group,
EffectsManager* pEffectsManager,
Expand Down
1 change: 1 addition & 0 deletions src/effects/chains/standardeffectchain.h
Expand Up @@ -8,6 +8,7 @@
/// linkings. However, the chain enable switch is hidden because it
/// is redundant with the input routing switches and effect enable switches.
class StandardEffectChain : public EffectChain {
Q_OBJECT
public:
StandardEffectChain(unsigned int iChainNumber,
EffectsManager* pEffectsManager,
Expand Down
4 changes: 2 additions & 2 deletions src/effects/defs.h
Expand Up @@ -20,8 +20,8 @@ enum class EffectBackendType {
Unknown
};

inline uint qHash(const EffectBackendType& backendType) {
return static_cast<uint>(backendType);
inline qhash_seed_t qHash(const EffectBackendType& backendType) {
return static_cast<qhash_seed_t>(backendType);
}

enum class SignalProcessingStage {
Expand Down
1 change: 1 addition & 0 deletions src/engine/bufferscalers/enginebufferscalelinear.h
Expand Up @@ -8,6 +8,7 @@ constexpr int kiLinearScaleReadAheadLength = 10240;


class EngineBufferScaleLinear : public EngineBufferScale {
Q_OBJECT
public:
explicit EngineBufferScaleLinear(
ReadAheadManager *pReadAheadManager);
Expand Down
1 change: 1 addition & 0 deletions src/engine/enginepregain.h
Expand Up @@ -12,6 +12,7 @@ class ControlObject;
// including user pregain adjustment, ReplayGain value, and vinyl-like
// adjustments in volume relative to playback speed.
class EnginePregain : public EngineObject {
Q_OBJECT
public:
EnginePregain(const QString& group);
~EnginePregain() override;
Expand Down
1 change: 1 addition & 0 deletions src/engine/positionscratchcontroller.h
Expand Up @@ -10,6 +10,7 @@ class VelocityController;
class RateIIFilter;

class PositionScratchController : public QObject {
Q_OBJECT
public:
PositionScratchController(const QString& group);
virtual ~PositionScratchController();
Expand Down
4 changes: 2 additions & 2 deletions src/library/export/dlglibraryexport.cpp
Expand Up @@ -203,8 +203,8 @@ void DlgLibraryExport::exportRequested() {

// Construct a request to export the library/crates.
auto pRequest = QSharedPointer<EnginePrimeExportRequest>::create();
pRequest->engineLibraryDbDir = QDir{databaseDirectory};
pRequest->musicFilesDir = QDir{musicDirectory};
pRequest->engineLibraryDbDir.setPath(databaseDirectory);
pRequest->musicFilesDir.setPath(musicDirectory);
pRequest->exportVersion = exportVersion;
if (m_pCratesList->isEnabled()) {
const auto selectedItems = m_pCratesList->selectedItems();
Expand Down
1 change: 1 addition & 0 deletions src/library/proxytrackmodel.h
Expand Up @@ -13,6 +13,7 @@
// TrackModel search calls will not be delivered to the composed TrackModel
// because filtering is handled by the QSortFilterProxyModel.
class ProxyTrackModel : public QSortFilterProxyModel, public TrackModel {
Q_OBJECT
public:
// Construct a new ProxyTrackModel with pTrackModel as the TrackModel it
// composes. If bHandleSearches is true, then search signals will not be
Expand Down
1 change: 1 addition & 0 deletions src/library/rekordbox/rekordboxfeature.h
Expand Up @@ -40,6 +40,7 @@ class TrackCollectionManager;
class BaseExternalPlaylistModel;

class RekordboxPlaylistModel : public BaseExternalPlaylistModel {
Q_OBJECT
public:
RekordboxPlaylistModel(QObject* parent,
TrackCollectionManager* pTrackCollectionManager,
Expand Down
2 changes: 1 addition & 1 deletion src/library/serato/seratofeature.cpp
Expand Up @@ -454,7 +454,7 @@ QString parseDatabase(mixxx::DbConnectionPoolPtr dbConnectionPool, TreeItem* dat
// Serato does not exist on Linux, if it did, it would probably just mirror
// the way paths are handled on OSX.
if (databaseRootDir.canonicalPath().startsWith(QDir::homePath())) {
databaseRootDir = QDir::root();
databaseRootDir.setPath(QDir::rootPath());
}
#endif

Expand Down
1 change: 1 addition & 0 deletions src/library/serato/seratoplaylistmodel.h
Expand Up @@ -7,6 +7,7 @@ class TrackCollectionManager;
class BaseExternalPlaylistModel;

class SeratoPlaylistModel : public BaseExternalPlaylistModel {
Q_OBJECT
public:
SeratoPlaylistModel(QObject* parent,
TrackCollectionManager* pTrackCollectionManager,
Expand Down
2 changes: 2 additions & 0 deletions src/library/traktor/traktorfeature.h
Expand Up @@ -13,6 +13,7 @@
#include "library/treeitemmodel.h"

class TraktorTrackModel : public BaseExternalTrackModel {
Q_OBJECT
public:
TraktorTrackModel(QObject* parent,
TrackCollectionManager* pTrackCollectionManager,
Expand All @@ -21,6 +22,7 @@ class TraktorTrackModel : public BaseExternalTrackModel {
};

class TraktorPlaylistModel : public BaseExternalPlaylistModel {
Q_OBJECT
public:
TraktorPlaylistModel(QObject* parent,
TrackCollectionManager* pTrackCollectionManager,
Expand Down
1 change: 1 addition & 0 deletions src/qml/asyncimageprovider.h
Expand Up @@ -11,6 +11,7 @@ namespace mixxx {
namespace qml {

class AsyncImageResponse : public QQuickImageResponse, public QRunnable {
Q_OBJECT
public:
AsyncImageResponse(const QString& id, const QSize& requestedSize);
QQuickTextureFactory* textureFactory() const override;
Expand Down
1 change: 1 addition & 0 deletions src/util/battery/batterylinux.h
Expand Up @@ -3,6 +3,7 @@
#include "util/battery/battery.h"

class BatteryLinux : public Battery {
Q_OBJECT
public:
explicit BatteryLinux(QObject* pParent=nullptr);
~BatteryLinux() override;
Expand Down
1 change: 1 addition & 0 deletions src/util/battery/batterymac.h
Expand Up @@ -3,6 +3,7 @@
#include "util/battery/battery.h"

class BatteryMac : public Battery {
Q_OBJECT
public:
BatteryMac(QObject* pParent=nullptr);
virtual ~BatteryMac();
Expand Down
1 change: 1 addition & 0 deletions src/util/battery/batterywindows.h
Expand Up @@ -3,6 +3,7 @@
#include "util/battery/battery.h"

class BatteryWindows : public Battery {
Q_OBJECT
public:
BatteryWindows(QObject* pParent=nullptr);
~BatteryWindows() override = default;
Expand Down
2 changes: 1 addition & 1 deletion src/util/desktophelper.cpp
Expand Up @@ -159,7 +159,7 @@ void DesktopHelper::openInFileBrowser(const QStringList& paths) {
// Otherwise nothing would happen...
if (!dir.exists()) {
// it ensures a valid dir for any OS (Windows)
dir = QDir::home();
dir.setPath(QDir::homePath());
}
// not open the same dir twice
dirPath = dir.absolutePath();
Expand Down
1 change: 1 addition & 0 deletions src/util/workerthreadscheduler.h
Expand Up @@ -10,6 +10,7 @@ class WorkerThread;
/// as a worker thread. The maximum number of worker threads is
/// limited.
class WorkerThreadScheduler : public WorkerThread {
Q_OBJECT
public:
explicit WorkerThreadScheduler(
int maxWorkers,
Expand Down
1 change: 1 addition & 0 deletions src/vinylcontrol/vinylcontrol.h
Expand Up @@ -9,6 +9,7 @@
class ControlProxy;

class VinylControl : public QObject {
Q_OBJECT
public:
VinylControl(UserSettingsPointer pConfig, const QString& group);
virtual ~VinylControl();
Expand Down
1 change: 1 addition & 0 deletions src/vinylcontrol/vinylcontrolxwax.h
Expand Up @@ -21,6 +21,7 @@ extern "C" {
#define QUALITY_RING_SIZE 32

class VinylControlXwax : public VinylControl {
Q_OBJECT
public:
VinylControlXwax(UserSettingsPointer pConfig, const QString& group);
virtual ~VinylControlXwax();
Expand Down
1 change: 1 addition & 0 deletions src/widget/wanalysislibrarytableview.h
Expand Up @@ -6,6 +6,7 @@
#include "widget/wtracktableview.h"

class WAnalysisLibraryTableView : public WTrackTableView {
Q_OBJECT
public:
WAnalysisLibraryTableView(
QWidget* parent,
Expand Down
1 change: 1 addition & 0 deletions src/widget/woverviewhsv.h
Expand Up @@ -3,6 +3,7 @@
#include "widget/woverview.h"

class WOverviewHSV : public WOverview {
Q_OBJECT
public:
WOverviewHSV(
const QString& group,
Expand Down
1 change: 1 addition & 0 deletions src/widget/woverviewlmh.h
Expand Up @@ -3,6 +3,7 @@
#include "widget/woverview.h"

class WOverviewLMH : public WOverview {
Q_OBJECT
public:
WOverviewLMH(
const QString& group,
Expand Down
1 change: 1 addition & 0 deletions src/widget/woverviewrgb.h
Expand Up @@ -3,6 +3,7 @@
#include "widget/woverview.h"

class WOverviewRGB : public WOverview {
Q_OBJECT
public:
WOverviewRGB(
const QString& group,
Expand Down

0 comments on commit b0f19c3

Please sign in to comment.