From c1bca9674a4ddd6317798eca4df13ef1fa452896 Mon Sep 17 00:00:00 2001 From: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com> Date: Fri, 4 Oct 2024 17:57:45 +0200 Subject: [PATCH] refactor: wrap literals in QStringLiteral as appropriate --- src/effects/backends/builtin/metronomeeffect.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/effects/backends/builtin/metronomeeffect.cpp b/src/effects/backends/builtin/metronomeeffect.cpp index 2599fee60fc..c095f7be6df 100644 --- a/src/effects/backends/builtin/metronomeeffect.cpp +++ b/src/effects/backends/builtin/metronomeeffect.cpp @@ -62,16 +62,16 @@ std::span syncedClickOutput(double beatFractionBufferEnd, // static QString MetronomeEffect::getId() { - return "org.mixxx.effects.metronome"; + return QStringLiteral("org.mixxx.effects.metronome"); } // static EffectManifestPointer MetronomeEffect::getManifest() { - EffectManifestPointer pManifest(new EffectManifest()); + auto pManifest = EffectManifestPointer::create(); pManifest->setId(getId()); pManifest->setName(QObject::tr("Metronome")); - pManifest->setAuthor("The Mixxx Team"); - pManifest->setVersion("1.0"); + pManifest->setAuthor(QObject::tr("The Mixxx Team")); + pManifest->setVersion(QStringLiteral("1.0")); pManifest->setDescription(QObject::tr("Adds a metronome click sound to the stream")); pManifest->setEffectRampsFromDry(true); @@ -79,7 +79,7 @@ EffectManifestPointer MetronomeEffect::getManifest() { // The maximum is at 128 + 1 allowing 128 as max value and // enabling us to pause time when the parameter is above EffectManifestParameterPointer period = pManifest->addParameter(); - period->setId("bpm"); + period->setId(QStringLiteral("bpm")); period->setName(QObject::tr("BPM")); period->setDescription(QObject::tr("Set the beats per minute value of the click sound")); period->setValueScaler(EffectManifestParameter::ValueScaler::Logarithmic); @@ -88,7 +88,7 @@ EffectManifestPointer MetronomeEffect::getManifest() { // Period unit EffectManifestParameterPointer periodUnit = pManifest->addParameter(); - periodUnit->setId("sync"); + periodUnit->setId(QStringLiteral("sync")); periodUnit->setName(QObject::tr("Sync")); periodUnit->setDescription(QObject::tr( "Synchronizes the BPM with the track if it can be retrieved")); @@ -101,8 +101,8 @@ EffectManifestPointer MetronomeEffect::getManifest() { void MetronomeEffect::loadEngineEffectParameters( const QMap& parameters) { - m_pBpmParameter = parameters.value("bpm"); - m_pSyncParameter = parameters.value("sync"); + m_pBpmParameter = parameters.value(QStringLiteral("bpm")); + m_pSyncParameter = parameters.value(QStringLiteral("sync")); } void MetronomeEffect::processChannel(