diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2020-11-12 15:52:46 +0100 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2020-11-12 15:52:46 +0100 |
commit | 4ab3f5aec54dd1b20ac28e6a1be97449df1c7283 (patch) | |
tree | 156c7946d5baf91e41608001e60ede4d4a9d5d6b /src/effects | |
parent | 05d9182ca02a6ccd3f455c72cf949ba2463be2c7 (diff) | |
parent | c17ad0f76695fdab57ee66efe379e5081729d970 (diff) |
Merge branch '2.3' of git@github.com:mixxxdj/mixxx.git into main
# Conflicts:
# src/engine/controls/cuecontrol.cpp
# src/library/library.cpp
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/effect.cpp | 2 | ||||
-rw-r--r-- | src/effects/effectchainmanager.cpp | 8 | ||||
-rw-r--r-- | src/effects/effectchainslot.cpp | 6 | ||||
-rw-r--r-- | src/effects/effectrack.cpp | 4 | ||||
-rw-r--r-- | src/effects/effectslot.cpp | 17 | ||||
-rw-r--r-- | src/effects/effectsmanager.cpp | 2 |
6 files changed, 19 insertions, 20 deletions
diff --git a/src/effects/effect.cpp b/src/effects/effect.cpp index 1ca764d326..295565fa7d 100644 --- a/src/effects/effect.cpp +++ b/src/effects/effect.cpp @@ -181,7 +181,7 @@ EffectParameter* Effect::getFilteredParameterForSlot(ParameterFilterFnc filterFn // It's normal to ask for a parameter that doesn't exist. Callers must check // for NULL. unsigned int num = 0; - for (const auto& parameter: m_parameters) { + for (const auto& parameter : qAsConst(m_parameters)) { if (parameter->manifest()->showInParameterSlot() && filterFnc(parameter)) { if(num == slotNumber) { return parameter; diff --git a/src/effects/effectchainmanager.cpp b/src/effects/effectchainmanager.cpp index f472a766f5..ff7db2ba4e 100644 --- a/src/effects/effectchainmanager.cpp +++ b/src/effects/effectchainmanager.cpp @@ -144,13 +144,13 @@ EffectChainPointer EffectChainManager::getPrevEffectChain(EffectChainPointer pEf } void EffectChainManager::refeshAllRacks() { - for (const auto& pRack: m_standardEffectRacks) { + for (const auto& pRack : qAsConst(m_standardEffectRacks)) { pRack->refresh(); } - for (const auto& pRack: m_equalizerEffectRacks) { + for (const auto& pRack : qAsConst(m_equalizerEffectRacks)) { pRack->refresh(); } - for (const auto& pRack: m_quickEffectRacks) { + for (const auto& pRack : qAsConst(m_quickEffectRacks)) { pRack->refresh(); } } @@ -166,7 +166,7 @@ bool EffectChainManager::saveEffectChains() { QDomElement rootNode = doc.documentElement(); - for (EffectRackPointer pRack : m_standardEffectRacks) { + for (const EffectRackPointer& pRack : qAsConst(m_standardEffectRacks)) { rootNode.appendChild(pRack->toXml(&doc)); } // TODO? Save QuickEffects in effects.xml too, or keep stored in ConfigObjects? diff --git a/src/effects/effectchainslot.cpp b/src/effects/effectchainslot.cpp index d6b0be1d03..231e1c4254 100644 --- a/src/effects/effectchainslot.cpp +++ b/src/effects/effectchainslot.cpp @@ -240,7 +240,7 @@ void EffectChainSlot::updateRoutingSwitches() { VERIFY_OR_DEBUG_ASSERT(m_pEffectChain) { return; } - for (const ChannelInfo* pChannelInfo : m_channelInfoByName) { + for (const ChannelInfo* pChannelInfo : qAsConst(m_channelInfoByName)) { if (pChannelInfo->pEnabled->toBool()) { m_pEffectChain->enableForInputChannel(pChannelInfo->handleGroup); } else { @@ -273,7 +273,7 @@ void EffectChainSlot::clear() { if (m_pEffectChain) { m_pEffectChain->removeFromEngine(m_pEffectRack->getEngineEffectRack(), m_iChainSlotNumber); - for (EffectSlotPointer pSlot : m_slots) { + for (EffectSlotPointer pSlot : qAsConst(m_slots)) { pSlot->clear(); } m_pEffectChain->disconnect(this); @@ -392,7 +392,7 @@ void EffectChainSlot::slotControlChainSuperParameter(double v, bool force) { v = math_clamp(v, 0.0, 1.0); m_pControlChainSuperParameter->set(v); } - for (const auto& pSlot : m_slots) { + for (const auto& pSlot : qAsConst(m_slots)) { pSlot->setMetaParameter(v, force); } } diff --git a/src/effects/effectrack.cpp b/src/effects/effectrack.cpp index 09fbb113fe..607b681f23 100644 --- a/src/effects/effectrack.cpp +++ b/src/effects/effectrack.cpp @@ -204,7 +204,7 @@ QDomElement EffectRack::toXml(QDomDocument* doc) const { rackElement.appendChild(groupElement); QDomElement chainsElement = doc->createElement("Chains"); - for (EffectChainSlotPointer pChainSlot : m_effectChainSlots) { + for (const EffectChainSlotPointer& pChainSlot : m_effectChainSlots) { QDomElement chain = pChainSlot->toXml(doc); chainsElement.appendChild(chain); } @@ -213,7 +213,7 @@ QDomElement EffectRack::toXml(QDomDocument* doc) const { } void EffectRack::refresh() { - for (const auto& pChainSlot: m_effectChainSlots) { + for (const auto& pChainSlot : qAsConst(m_effectChainSlots)) { EffectChainPointer pChain = pChainSlot->getOrCreateEffectChain(m_pEffectsManager); pChain->refreshAllEffects(); } diff --git a/src/effects/effectslot.cpp b/src/effects/effectslot.cpp index c91083558a..15ba19c74c 100644 --- a/src/effects/effectslot.cpp +++ b/src/effects/effectslot.cpp @@ -177,14 +177,13 @@ void EffectSlot::loadEffect(EffectPointer pEffect, bool adoptMetaknobPosition) { addEffectButtonParameterSlot(); } - for (const auto& pParameter : m_parameters) { + for (const auto& pParameter : qAsConst(m_parameters)) { pParameter->loadEffect(pEffect); } - for (const auto& pParameter : m_buttonParameters) { + for (const auto& pParameter : qAsConst(m_buttonParameters)) { pParameter->loadEffect(pEffect); } - if (adoptMetaknobPosition) { slotEffectMetaParameter(m_pControlMetaParameter->get(), true); } else { @@ -208,10 +207,10 @@ void EffectSlot::clear() { m_pControlLoaded->forceSet(0.0); m_pControlNumParameters->forceSet(0.0); m_pControlNumButtonParameters->forceSet(0.0); - for (const auto& pParameter : m_parameters) { + for (const auto& pParameter : qAsConst(m_parameters)) { pParameter->clear(); } - for (const auto& pParameter : m_buttonParameters) { + for (const auto& pParameter : qAsConst(m_buttonParameters)) { pParameter->clear(); } m_pEffect.clear(); @@ -245,7 +244,7 @@ void EffectSlot::slotClear(double v) { } void EffectSlot::syncSofttakeover() { - for (const auto& pParameterSlot : m_parameters) { + for (const auto& pParameterSlot : qAsConst(m_parameters)) { pParameterSlot->syncSofttakeover(); } } @@ -275,7 +274,7 @@ void EffectSlot::slotEffectMetaParameter(double v, bool force) { if (!m_pControlEnabled->toBool()) { force = true; } - for (const auto& pParameterSlot : m_parameters) { + for (const auto& pParameterSlot : qAsConst(m_parameters)) { pParameterSlot->onEffectMetaParameterChanged(v, force); } } @@ -358,13 +357,13 @@ void EffectSlot::loadEffectSlotFromXml(const QDomElement& effectElement) { } QMap<QString, EffectParameterSlotBasePointer> parametersById; - for (const auto& pParameter : m_parameters) { + for (const auto& pParameter : qAsConst(m_parameters)) { EffectManifestParameterPointer manifest = pParameter->getManifest(); if (manifest) { parametersById.insert(manifest->id(), pParameter); } } - for (const auto& pParameter : m_buttonParameters) { + for (const auto& pParameter : qAsConst(m_buttonParameters)) { EffectManifestParameterPointer manifest = pParameter->getManifest(); if (manifest) { parametersById.insert(manifest->id(), pParameter); diff --git a/src/effects/effectsmanager.cpp b/src/effects/effectsmanager.cpp index c1e62f310d..bb4c3c4de0 100644 --- a/src/effects/effectsmanager.cpp +++ b/src/effects/effectsmanager.cpp @@ -204,7 +204,7 @@ EffectPointer EffectsManager::instantiateEffect(const QString& effectId) { if (effectId.isEmpty()) { return EffectPointer(); } - for (const auto& pBackend: m_effectsBackends) { + for (const auto& pBackend : qAsConst(m_effectsBackends)) { if (pBackend->canInstantiateEffect(effectId)) { return pBackend->instantiateEffect(this, effectId); } |