Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clazy fixes #4636

Merged
merged 4 commits into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/control/control.h
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "widget/woverview.h"

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