Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/2.4' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Jun 27, 2023
2 parents 5f22560 + a9c69fc commit 5879cd8
Show file tree
Hide file tree
Showing 28 changed files with 94 additions and 93 deletions.
22 changes: 6 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -827,8 +827,8 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/library/recording/dlgrecording.cpp
src/library/recording/dlgrecording.ui
src/library/recording/recordingfeature.cpp
src/library/rekordbox/rekordbox_anlz.cpp
src/library/rekordbox/rekordbox_pdb.cpp
src/library/rekordbox/kaitaistructs/rekordbox_anlz.cpp
src/library/rekordbox/kaitaistructs/rekordbox_pdb.cpp
src/library/rekordbox/rekordboxfeature.cpp
src/library/rhythmbox/rhythmboxfeature.cpp
src/library/scanner/importfilestask.cpp
Expand Down Expand Up @@ -1288,35 +1288,25 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
endif()

# Disable warnings in generated source files
set_property(
SOURCE src/library/rekordbox/rekordbox_anlz.cpp
APPEND_STRING
PROPERTY CXX_CLANG_TIDY ""
)
set_property(
SOURCE src/library/rekordbox/rekordbox_pdb.cpp
APPEND_STRING
PROPERTY CXX_CLANG_TIDY ""
)
if(GNU_GCC OR LLVM_CLANG)
set_property(
SOURCE src/library/rekordbox/rekordbox_anlz.cpp
SOURCE src/library/rekordbox/kaitaistructs/rekordbox_anlz.cpp
APPEND_STRING
PROPERTY COMPILE_OPTIONS -Wno-unused-parameter
)
set_property(
SOURCE src/library/rekordbox/rekordbox_pdb.cpp
SOURCE src/library/rekordbox/kaitaistructs/rekordbox_pdb.cpp
APPEND_STRING
PROPERTY COMPILE_OPTIONS -Wno-unused-parameter -Wno-switch
)
elseif(MSVC)
set_property(
SOURCE src/library/rekordbox/rekordbox_anlz.cpp
SOURCE src/library/rekordbox/kaitaistructs/rekordbox_anlz.cpp
APPEND_STRING
PROPERTY COMPILE_OPTIONS /w
)
set_property(
SOURCE src/library/rekordbox/rekordbox_pdb.cpp
SOURCE src/library/rekordbox/kaitaistructs/rekordbox_pdb.cpp
APPEND_STRING
PROPERTY COMPILE_OPTIONS /w
)
Expand Down
12 changes: 6 additions & 6 deletions res/controllers/Numark_DJ2GO2_Touch.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -892,29 +892,29 @@
</control>
<control>
<group>[Master]</group>
<key>DJ2GO2Touch.crossfader.input</key>
<key>crossfader</key>
<status>0xBF</status>
<midino>0x08</midino>
<options>
<script-binding/>
<normal/>
</options>
</control>
<control>
<group>[Master]</group>
<key>DJ2GO2Touch.masterGain.input</key>
<key>gain</key>
<status>0xBF</status>
<midino>0x0A</midino>
<options>
<script-binding/>
<normal/>
</options>
</control>
<control>
<group>[Master]</group>
<key>DJ2GO2Touch.cueGain.input</key>
<key>headGain</key>
<status>0xBF</status>
<midino>0x0C</midino>
<options>
<script-binding/>
<normal/>
</options>
</control>
<control>
Expand Down
20 changes: 1 addition & 19 deletions res/controllers/Numark_DJ2GO2_Touch_scripts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var DJ2GO2Touch = {};
DJ2GO2Touch.ControllerStatusSysex = [0xF0, 0x00, 0x20, 0x7F, 0x03, 0x01, 0xF7];
DJ2GO2Touch.ControllerStatusSysex = [0xF0, 0x00, 0x01, 0x3F, 0x3C, 0x48, 0xF7];
DJ2GO2Touch.padsPerDeck = 4;

DJ2GO2Touch.init = function() {
Expand Down Expand Up @@ -47,24 +47,6 @@ DJ2GO2Touch.browseEncoder = new components.Encoder({
}
});

DJ2GO2Touch.masterGain = new components.Pot({
midi: [0xBF, 0x0A],
group: "[Master]",
key: "gain"
});

DJ2GO2Touch.cueGain = new components.Pot({
midi: [0xBF, 0x0C],
group: "[Master]",
key: "headGain"
});

DJ2GO2Touch.crossfader = new components.Pot({
midi: [0xBF, 0x08],
group: "[Master]",
key: "crossfader"
});

DJ2GO2Touch.Deck = function(deckNumbers, midiChannel) {
components.Deck.call(this, deckNumbers);
this.playButton = new components.PlayButton([0x90 + midiChannel, 0x00]);
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/dlgprefcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ QString DlgPrefController::askForMappingName(const QString& prefilledName) const
"special characters.");
QString fileExistsLabel = tr("A mapping file with that name already exists.");
// Only allow the name to contain letters, numbers, whitespaces and _-+()/
const QRegularExpression rxRemove = QRegularExpression(
static const QRegularExpression rxRemove = QRegularExpression(
QStringLiteral("[^[(a-zA-Z0-9\\_\\-\\+\\(\\)\\/|\\s]"));

// Choose a new file (base) name
Expand Down
2 changes: 1 addition & 1 deletion src/effects/backends/lv2/lv2manifest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ LV2Manifest::LV2Manifest(LilvWorld* world,
}
} else { // Try to extract the custom unit symbol string
LilvNode* customUnit =
lilv_world_get(world, unit, properties["unit_symbol"], NULL);
lilv_world_get(world, unit, properties["unit_symbol"], nullptr);
if (customUnit) {
// Accepted custom units needs to be 'whitelisted' in
// EffectManifestParameter::lv2UnitToUnitsHint and added to
Expand Down
2 changes: 0 additions & 2 deletions src/effects/presets/effectchainpresetmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,6 @@ EffectsXmlData EffectChainPresetManager::readEffectsXml(
importUserPresets();

// Reload order of custom chain presets
QStringList chainPresetsSorted;
QDomElement chainPresetsElement =
XmlParse::selectElement(root, EffectXml::kChainPresetList);
QDomNodeList presetNameList =
Expand Down Expand Up @@ -703,7 +702,6 @@ EffectsXmlData EffectChainPresetManager::readEffectsXml(
}

// Reload order of QuickEffect chain presets
QStringList quickEffectChainPresetsSorted;
QDomElement quickEffectChainPresetsElement =
XmlParse::selectElement(root, EffectXml::kQuickEffectList);
QDomNodeList quickEffectPresetNameList =
Expand Down
2 changes: 1 addition & 1 deletion src/engine/controls/cuecontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ void CueControl::loadCuesFromTrack() {
}

int hotcue = pCue->getHotCue();
HotcueControl* pControl = m_hotcueControls.value(hotcue, NULL);
HotcueControl* pControl = m_hotcueControls.value(hotcue, nullptr);

// Cue's hotcue doesn't have a hotcue control.
if (pControl == nullptr) {
Expand Down
8 changes: 4 additions & 4 deletions src/library/dlgtrackinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,10 @@ void DlgTrackInfo::saveTrack() {
// This hack makes a focused QLineEdit emit editingFinished() (clearFocus()
// implicitly emits a focusOutEvent()
if (this == QApplication::activeWindow()) {
auto focusWidget = QApplication::focusWidget();
if (focusWidget) {
focusWidget->clearFocus();
focusWidget->setFocus();
auto* pFocusWidget = QApplication::focusWidget();
if (pFocusWidget) {
pFocusWidget->clearFocus();
pFocusWidget->setFocus();
}
}

Expand Down
6 changes: 6 additions & 0 deletions src/library/rekordbox/kaitaistructs/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Disable all clang-tidy checks generated code in this folder
# clang-tidy errors if you remove all checks, so this is one workaround
# https://stackoverflow.com/a/58379342/251068
Checks: "-*,misc-definitions-in-headers"
CheckOptions:
- { key: HeaderFileExtensions, value: "x" }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/library/rekordbox/rekordboxfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "library/dao/trackschema.h"
#include "library/library.h"
#include "library/queryutil.h"
#include "library/rekordbox/rekordbox_anlz.h"
#include "library/rekordbox/rekordbox_pdb.h"
#include "library/rekordbox/kaitaistructs/rekordbox_anlz.h"
#include "library/rekordbox/kaitaistructs/rekordbox_pdb.h"
#include "library/rekordbox/rekordboxconstants.h"
#include "library/trackcollection.h"
#include "library/trackcollectionmanager.h"
Expand Down
1 change: 0 additions & 1 deletion src/library/searchquery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@ QString YearFilterNode::toSql() const {
}

if (m_bRangeQuery) {
QStringList rangeClauses;
return QString(
QStringLiteral("CAST(substr(year,1,4) AS INTEGER) BETWEEN %1 AND %2"))
.arg(QString::number(m_dRangeLow),
Expand Down
4 changes: 2 additions & 2 deletions src/mixxxmainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ namespace {
inline bool supportsGlobalMenu() {
#ifndef QT_NO_DBUS
QDBusConnection conn = QDBusConnection::sessionBus();
if (const auto iface = conn.interface()) {
return iface->isServiceRegistered("com.canonical.AppMenu.Registrar");
if (const auto* pIface = conn.interface()) {
return pIface->isServiceRegistered("com.canonical.AppMenu.Registrar");
}
#endif
return false;
Expand Down
14 changes: 7 additions & 7 deletions src/preferences/dialog/dlgprefeffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void DlgPrefEffects::slotApply() {
}

void DlgPrefEffects::saveChainPresetLists() {
auto pModel = dynamic_cast<EffectChainPresetListModel*>(chainListView->model());
auto* pModel = dynamic_cast<EffectChainPresetListModel*>(chainListView->model());
m_pChainPresetManager->setPresetOrder(pModel->stringList());

pModel = dynamic_cast<EffectChainPresetListModel*>(quickEffectListView->model());
Expand Down Expand Up @@ -165,7 +165,7 @@ void DlgPrefEffects::loadChainPresetLists() {
for (const auto& pChainPreset : m_pChainPresetManager->getPresetsSorted()) {
chainPresetNames << pChainPreset->name();
}
auto pModel = dynamic_cast<EffectChainPresetListModel*>(chainListView->model());
auto* pModel = dynamic_cast<EffectChainPresetListModel*>(chainListView->model());
pModel->setStringList(chainPresetNames);

QStringList quickEffectChainPresetNames;
Expand All @@ -189,7 +189,7 @@ void DlgPrefEffects::effectsTableItemSelected(const QModelIndex& selected) {
clearEffectInfo();
return;
}
auto pModel = static_cast<const EffectManifestTableModel*>(selected.model());
const auto* pModel = static_cast<const EffectManifestTableModel*>(selected.model());
VERIFY_OR_DEBUG_ASSERT(pModel) {
return;
}
Expand Down Expand Up @@ -281,15 +281,15 @@ void DlgPrefEffects::slotDeletePreset() {
VERIFY_OR_DEBUG_ASSERT(m_pFocusedChainList) {
return;
}
auto pFocusedModel = dynamic_cast<EffectChainPresetListModel*>(
auto* pFocusedModel = dynamic_cast<EffectChainPresetListModel*>(
m_pFocusedChainList->model());
QStringList focusedChainStringList = pFocusedModel->stringList();

QListView* pUnfocusedChainList = unfocusedChainList();
VERIFY_OR_DEBUG_ASSERT(pUnfocusedChainList) {
return;
}
auto pUnfocusedModel = dynamic_cast<EffectChainPresetListModel*>(
auto* pUnfocusedModel = dynamic_cast<EffectChainPresetListModel*>(
pUnfocusedChainList->model());
auto unfocusedChainStringList = pUnfocusedModel->stringList();

Expand Down Expand Up @@ -319,8 +319,8 @@ bool DlgPrefEffects::eventFilter(QObject* object, QEvent* event) {
// * clear selection in adjacent view
// * restore previous selection (select first item if none was selected)
// which updates the info box via 'currentRowChanged' signals
auto pChainList = qobject_cast<QListView*>(object);
auto pEffectList = qobject_cast<QTableView*>(object);
auto* pChainList = qobject_cast<QListView*>(object);
auto* pEffectList = qobject_cast<QTableView*>(object);
// Restore previous selection only if focus was changed with keyboard.
// For mouse clicks, that procedure would select the wrong index.
QFocusEvent* focEv = static_cast<QFocusEvent*>(event);
Expand Down
6 changes: 3 additions & 3 deletions src/track/beats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ mixxx::BeatsPointer Beats::fromBeatGridByteArray(
bpm = Bpm(grid.bpm().bpm());
} else if (byteArray.size() == sizeof(BeatGridV1Data)) {
// Legacy fallback for BeatGrid-1.0
const auto blob = reinterpret_cast<const BeatGridV1Data*>(byteArray.constData());
position = mixxx::audio::FramePos(blob->firstBeat);
bpm = mixxx::Bpm(blob->bpm);
const auto* pBlob = reinterpret_cast<const BeatGridV1Data*>(byteArray.constData());
position = mixxx::audio::FramePos(pBlob->firstBeat);
bpm = mixxx::Bpm(pBlob->bpm);
}

if (position.isValid() && bpm.isValid()) {
Expand Down
4 changes: 2 additions & 2 deletions src/track/taglib/trackmetadata_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ bool readAudioPropertiesFromFile(
// we must pick one explicit,
// to prevent "use of overloaded operator '<<' is ambiguous" error
// on clang-cl builds.
const auto filename = file.name().wstr();
const std::wstring& filename = file.name().wstr();
#else
const auto filename = file.name();
const char* filename = file.name();
#endif
if (!file.isValid()) {
kLogger.warning() << "Cannot read audio properties from "
Expand Down
2 changes: 1 addition & 1 deletion src/util/dnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ QList<mixxx::FileInfo> DragAndDropHelper::supportedTracksFromUrls(

if (acceptPlaylists && Parser::isPlaylistFilenameSupported(file)) {
const QList<QString> track_list = Parser::parse(file);
for (auto& playlistFile : track_list) {
for (const auto& playlistFile : track_list) {
addFileToList(mixxx::FileInfo(playlistFile), &fileInfos);
}
} else {
Expand Down
6 changes: 3 additions & 3 deletions src/vinylcontrol/vinylcontrolprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ VinylControlProcessor::VinylControlProcessor(QObject* pParent, UserSettingsPoint
m_pToggle(new ControlPushButton(ConfigKey(VINYL_PREF_KEY, "Toggle"))),
m_pWorkBuffer(SampleUtil::alloc(MAX_BUFFER_LEN)),
m_processorsLock(QT_RECURSIVE_MUTEX_INIT),
m_processors(kMaximumVinylControlInputs, NULL),
m_processors(kMaximumVinylControlInputs, nullptr),
m_signalQualityFifo(SIGNAL_QUALITY_FIFO_SIZE),
m_bReportSignalQuality(false),
m_bQuit(false),
Expand Down Expand Up @@ -192,14 +192,14 @@ void VinylControlProcessor::onInputUnconfigured(const AudioInput& input) {

auto locker = lockMutex(&m_processorsLock);
VinylControl* pVC = m_processors.at(index);
m_processors.replace(index, NULL);
m_processors.replace(index, nullptr);
locker.unlock();
// Delete outside of the critical section to avoid deadlocks.
delete pVC;
}

bool VinylControlProcessor::deckConfigured(int index) const {
return m_processors[index] != NULL;
return m_processors[index] != nullptr;
}

void VinylControlProcessor::receiveBuffer(const AudioInput& input,
Expand Down
22 changes: 11 additions & 11 deletions src/waveform/widgets/allshader/waveformwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ WaveformWidget::WaveformWidget(const QString& group, QWidget* parent)

WaveformWidget::~WaveformWidget() {
makeCurrentIfNeeded();
for (auto renderer : std::as_const(m_rendererStack)) {
delete renderer;
for (auto* pRenderer : std::as_const(m_rendererStack)) {
delete pRenderer;
}
m_rendererStack.clear();
doneCurrent();
Expand All @@ -37,25 +37,25 @@ void WaveformWidget::paintGL() {
m_rendererStack[0]->allshaderWaveformRenderer()->paintGL();
}
} else {
for (auto renderer : std::as_const(m_rendererStack)) {
renderer->allshaderWaveformRenderer()->paintGL();
for (auto* pRenderer : std::as_const(m_rendererStack)) {
pRenderer->allshaderWaveformRenderer()->paintGL();
}
}
}

void WaveformWidget::initializeGL() {
for (auto renderer : std::as_const(m_rendererStack)) {
renderer->allshaderWaveformRenderer()->initializeGL();
for (auto* pRenderer : std::as_const(m_rendererStack)) {
pRenderer->allshaderWaveformRenderer()->initializeGL();
}
}

void WaveformWidget::resizeGL(int w, int h) {
for (auto renderer : std::as_const(m_rendererStack)) {
renderer->allshaderWaveformRenderer()->resizeGL(w, h);
for (auto* pRenderer : std::as_const(m_rendererStack)) {
pRenderer->allshaderWaveformRenderer()->resizeGL(w, h);
}
}

void WaveformWidget::wheelEvent(QWheelEvent* event) {
QApplication::sendEvent(parentWidget(), event);
event->accept();
void WaveformWidget::wheelEvent(QWheelEvent* pEvent) {
QApplication::sendEvent(parentWidget(), pEvent);
pEvent->accept();
}
Loading

0 comments on commit 5879cd8

Please sign in to comment.