diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fddb27134b..ab2dbd4c0a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1377,6 +1377,7 @@ set(MIXXX_LIB_PRECOMPILED_HEADER src/track/tracknumbers.h src/track/trackrecord.h src/track/trackref.h + src/util/always_false_v.h src/util/alphabetafilter.h src/util/battery/battery.h src/util/cache.h @@ -1473,6 +1474,7 @@ set(MIXXX_LIB_PRECOMPILED_HEADER src/util/statmodel.h src/util/statsmanager.h src/util/string.h + src/util/stringformat.h src/util/tapfilter.h src/util/task.h src/util/taskmonitor.h diff --git a/src/analyzer/analyzerebur128.cpp b/src/analyzer/analyzerebur128.cpp index f03de72791a..5c5510f8416 100644 --- a/src/analyzer/analyzerebur128.cpp +++ b/src/analyzer/analyzerebur128.cpp @@ -49,7 +49,7 @@ bool AnalyzerEbur128::processSamples(const CSAMPLE* pIn, SINT count) { VERIFY_OR_DEBUG_ASSERT(m_pState) { return false; } - ScopedTimer t(u"AnalyzerEbur128::processSamples()"); + ScopedTimer t(QStringLiteral("AnalyzerEbur128::processSamples()")); size_t frames = count / mixxx::kAnalysisChannels; int e = ebur128_add_frames_float(m_pState, pIn, frames); VERIFY_OR_DEBUG_ASSERT(e == EBUR128_SUCCESS) { diff --git a/src/analyzer/analyzergain.cpp b/src/analyzer/analyzergain.cpp index 52192c58dae..16315baa35d 100644 --- a/src/analyzer/analyzergain.cpp +++ b/src/analyzer/analyzergain.cpp @@ -37,7 +37,7 @@ void AnalyzerGain::cleanup() { } bool AnalyzerGain::processSamples(const CSAMPLE* pIn, SINT count) { - ScopedTimer t(u"AnalyzerGain::process()"); + ScopedTimer t(QStringLiteral("AnalyzerGain::process()")); SINT numFrames = count / mixxx::kAnalysisChannels; if (numFrames > static_cast(m_pLeftTempBuffer.size())) { diff --git a/src/coreservices.cpp b/src/coreservices.cpp index e1b57089f90..82af9c68f6e 100644 --- a/src/coreservices.cpp +++ b/src/coreservices.cpp @@ -113,7 +113,7 @@ CoreServices::CoreServices(const CmdlineArgs& args, QApplication* pApp) m_isInitialized(false) { m_runtime_timer.start(); mixxx::Time::start(); - ScopedTimer t(u"CoreServices::CoreServices"); + ScopedTimer t(QStringLiteral("CoreServices::CoreServices")); // All this here is running without without start up screen // Defer long initializations to CoreServices::initialize() which is // called after the GUI is initialized @@ -213,7 +213,7 @@ void CoreServices::initialize(QApplication* pApp) { return; } - ScopedTimer t(u"CoreServices::initialize"); + ScopedTimer t(QStringLiteral("CoreServices::initialize")); VERIFY_OR_DEBUG_ASSERT(SoundSourceProxy::registerProviders()) { qCritical() << "Failed to register any SoundSource providers"; diff --git a/src/engine/channelmixer.cpp b/src/engine/channelmixer.cpp index 0e214f00120..3662095474b 100644 --- a/src/engine/channelmixer.cpp +++ b/src/engine/channelmixer.cpp @@ -23,7 +23,7 @@ void ChannelMixer::applyEffectsAndMixChannels(const EngineMixer::GainCalculator& // D) Mixes the temporary buffer into pOutput // The original channel input buffers are not modified. SampleUtil::clear(pOutput, iBufferSize); - ScopedTimer t(u"EngineMixer::applyEffectsAndMixChannels"); + ScopedTimer t(QStringLiteral("EngineMixer::applyEffectsAndMixChannels")); for (auto* pChannelInfo : activeChannels) { EngineMixer::GainCache& gainCache = (*channelGainCache)[pChannelInfo->m_index]; CSAMPLE_GAIN oldGain = gainCache.m_gain; @@ -68,7 +68,7 @@ void ChannelMixer::applyEffectsInPlaceAndMixChannels( // A) Applies the calculated gain to the channel buffer, modifying the original input buffer // B) Applies effects to the buffer, modifying the original input buffer // 4. Mix the channel buffers together to make pOutput, overwriting the pOutput buffer from the last engine callback - ScopedTimer t(u"EngineMixer::applyEffectsInPlaceAndMixChannels"); + ScopedTimer t(QStringLiteral("EngineMixer::applyEffectsInPlaceAndMixChannels")); SampleUtil::clear(pOutput, iBufferSize); for (auto* pChannelInfo : activeChannels) { EngineMixer::GainCache& gainCache = (*channelGainCache)[pChannelInfo->m_index]; diff --git a/src/engine/enginebuffer.cpp b/src/engine/enginebuffer.cpp index 3f767a20c15..59370924b0c 100644 --- a/src/engine/enginebuffer.cpp +++ b/src/engine/enginebuffer.cpp @@ -844,7 +844,7 @@ void EngineBuffer::slotKeylockEngineChanged(double dIndex) { void EngineBuffer::processTrackLocked( CSAMPLE* pOutput, const int iBufferSize, mixxx::audio::SampleRate sampleRate) { - ScopedTimer t(u"EngineBuffer::process_pauselock"); + ScopedTimer t(QStringLiteral("EngineBuffer::process_pauselock")); m_trackSampleRateOld = mixxx::audio::SampleRate::fromDouble(m_pTrackSampleRate->get()); m_trackEndPositionOld = getTrackEndPosition(); diff --git a/src/engine/enginemixer.cpp b/src/engine/enginemixer.cpp index fb9afd981c9..fe68d85f0b9 100644 --- a/src/engine/enginemixer.cpp +++ b/src/engine/enginemixer.cpp @@ -281,7 +281,7 @@ void EngineMixer::processChannels(int iBufferSize) { m_activeTalkoverChannels.clear(); m_activeChannels.clear(); - // ScopedTimer timer(u"EngineMixer::processChannels"); + // ScopedTimer timer(QStringLiteral("EngineMixer::processChannels")); EngineChannel* pLeaderChannel = m_pEngineSync->getLeaderChannel(); // Reserve the first place for the main channel which // should be processed first diff --git a/src/library/dao/trackdao.cpp b/src/library/dao/trackdao.cpp index 4e53cce203e..8bb46450c2b 100644 --- a/src/library/dao/trackdao.cpp +++ b/src/library/dao/trackdao.cpp @@ -1368,7 +1368,7 @@ TrackPointer TrackDAO::getTrackById(TrackId trackId) const { // be executed with a lock on the GlobalTrackCache. The GlobalTrackCache // will be locked again after the query has been executed (see below) // and potential race conditions will be resolved. - ScopedTimer t(u"TrackDAO::getTrackById"); + ScopedTimer t(QStringLiteral("TrackDAO::getTrackById")); QSqlRecord queryRecord; { diff --git a/src/library/scanner/importfilestask.cpp b/src/library/scanner/importfilestask.cpp index 1d997a92f6d..0d8311b2db1 100644 --- a/src/library/scanner/importfilestask.cpp +++ b/src/library/scanner/importfilestask.cpp @@ -21,7 +21,7 @@ ImportFilesTask::ImportFilesTask(LibraryScanner* pScanner, } void ImportFilesTask::run() { - ScopedTimer timer(u"ImportFilesTask::run"); + ScopedTimer timer(QStringLiteral("ImportFilesTask::run")); for (const QFileInfo& fileInfo: m_filesToImport) { // If a flag was raised telling us to cancel the library scan then stop. if (m_scannerGlobal->shouldCancel()) { diff --git a/src/library/scanner/libraryscanner.cpp b/src/library/scanner/libraryscanner.cpp index cc0bf94bac5..fe60f2be499 100644 --- a/src/library/scanner/libraryscanner.cpp +++ b/src/library/scanner/libraryscanner.cpp @@ -489,7 +489,7 @@ void LibraryScanner::cancel() { void LibraryScanner::queueTask(ScannerTask* pTask) { //kLogger.debug() << "queueTask" << pTask; - ScopedTimer timer(u"LibraryScanner::queueTask"); + ScopedTimer timer(QStringLiteral("LibraryScanner::queueTask")); if (m_scannerGlobal.isNull() || m_scannerGlobal->shouldCancel()) { return; } @@ -531,7 +531,7 @@ void LibraryScanner::queueTask(ScannerTask* pTask) { void LibraryScanner::slotDirectoryHashedAndScanned(const QString& directoryPath, bool newDirectory, mixxx::cache_key_t hash) { - ScopedTimer timer(u"LibraryScanner::slotDirectoryHashedAndScanned"); + ScopedTimer timer(QStringLiteral("LibraryScanner::slotDirectoryHashedAndScanned")); //kLogger.debug() << "sloDirectoryHashedAndScanned" << directoryPath // << newDirectory << hash; @@ -550,7 +550,7 @@ void LibraryScanner::slotDirectoryHashedAndScanned(const QString& directoryPath, } void LibraryScanner::slotDirectoryUnchanged(const QString& directoryPath) { - ScopedTimer timer(u"LibraryScanner::slotDirectoryUnchanged"); + ScopedTimer timer(QStringLiteral("LibraryScanner::slotDirectoryUnchanged")); //kLogger.debug() << "slotDirectoryUnchanged" << directoryPath; if (m_scannerGlobal) { m_scannerGlobal->addVerifiedDirectory(directoryPath); @@ -560,7 +560,7 @@ void LibraryScanner::slotDirectoryUnchanged(const QString& directoryPath) { void LibraryScanner::slotTrackExists(const QString& trackPath) { //kLogger.debug() << "slotTrackExists" << trackPath; - ScopedTimer timer(u"LibraryScanner::slotTrackExists"); + ScopedTimer timer(QStringLiteral("LibraryScanner::slotTrackExists")); if (m_scannerGlobal) { m_scannerGlobal->addVerifiedTrack(trackPath); } @@ -568,7 +568,7 @@ void LibraryScanner::slotTrackExists(const QString& trackPath) { void LibraryScanner::slotAddNewTrack(const QString& trackPath) { //kLogger.debug() << "slotAddNewTrack" << trackPath; - ScopedTimer timer(u"LibraryScanner::addNewTrack"); + ScopedTimer timer(QStringLiteral("LibraryScanner::addNewTrack")); // For statistics tracking and to detect moved tracks TrackPointer pTrack = m_trackDao.addTracksAddFile( trackPath, diff --git a/src/library/scanner/recursivescandirectorytask.cpp b/src/library/scanner/recursivescandirectorytask.cpp index df93b6e038d..5a2a4e97592 100644 --- a/src/library/scanner/recursivescandirectorytask.cpp +++ b/src/library/scanner/recursivescandirectorytask.cpp @@ -20,7 +20,7 @@ RecursiveScanDirectoryTask::RecursiveScanDirectoryTask( } void RecursiveScanDirectoryTask::run() { - ScopedTimer timer(u"RecursiveScanDirectoryTask::run"); + ScopedTimer timer(QStringLiteral("RecursiveScanDirectoryTask::run")); if (m_scannerGlobal->shouldCancel()) { setSuccess(false); return; diff --git a/src/mixxxmainwindow.cpp b/src/mixxxmainwindow.cpp index af88465c7f6..8239443e9f1 100644 --- a/src/mixxxmainwindow.cpp +++ b/src/mixxxmainwindow.cpp @@ -774,7 +774,7 @@ void MixxxMainWindow::slotUpdateWindowTitle(TrackPointer pTrack) { void MixxxMainWindow::createMenuBar() { qWarning() << " $ createMenuBar"; - ScopedTimer t(u"MixxxMainWindow::createMenuBar"); + ScopedTimer t(QStringLiteral("MixxxMainWindow::createMenuBar")); DEBUG_ASSERT(m_pCoreServices->getKeyboardConfig()); m_pMenuBar = make_parented( this, m_pCoreServices->getSettings(), m_pCoreServices->getKeyboardConfig().get()); @@ -789,7 +789,7 @@ void MixxxMainWindow::connectMenuBar() { // so all connections must be unique! qWarning() << " $ connectMenuBar"; - ScopedTimer t(u"MixxxMainWindow::connectMenuBar"); + ScopedTimer t(QStringLiteral("MixxxMainWindow::connectMenuBar")); connect(this, &MixxxMainWindow::skinLoaded, m_pMenuBar, diff --git a/src/skin/legacy/legacyskinparser.cpp b/src/skin/legacy/legacyskinparser.cpp index 9bc4f0fcd5d..fcec0893903 100644 --- a/src/skin/legacy/legacyskinparser.cpp +++ b/src/skin/legacy/legacyskinparser.cpp @@ -318,7 +318,7 @@ Qt::MouseButton LegacySkinParser::parseButtonState(const QDomNode& node, } QWidget* LegacySkinParser::parseSkin(const QString& skinPath, QWidget* pParent) { - ScopedTimer timer(u"SkinLoader::parseSkin"); + ScopedTimer timer(QStringLiteral("SkinLoader::parseSkin")); qDebug() << "LegacySkinParser loading skin:" << skinPath; m_pContext = std::make_unique(m_pConfig, skinPath + "/skin.xml"); diff --git a/src/skin/skinloader.cpp b/src/skin/skinloader.cpp index 48500757fc3..a91a2fda62b 100644 --- a/src/skin/skinloader.cpp +++ b/src/skin/skinloader.cpp @@ -131,7 +131,7 @@ QString SkinLoader::getDefaultSkinName() const { QWidget* SkinLoader::loadConfiguredSkin(QWidget* pParent, QSet* pSkinCreatedControls, mixxx::CoreServices* pCoreServices) { - ScopedTimer timer(u"SkinLoader::loadConfiguredSkin"); + ScopedTimer timer(QStringLiteral("SkinLoader::loadConfiguredSkin")); SkinPointer pSkin = getConfiguredSkin(); // If we don't have a skin then fail. This makes sense here, because the diff --git a/src/soundio/sounddevicenetwork.cpp b/src/soundio/sounddevicenetwork.cpp index 0c74aaf126f..680bed9b462 100644 --- a/src/soundio/sounddevicenetwork.cpp +++ b/src/soundio/sounddevicenetwork.cpp @@ -497,7 +497,7 @@ void SoundDeviceNetwork::callbackProcessClkRef() { m_pSoundManager->readProcess(framesPerBuffer); { - ScopedTimer t(u"SoundDevicePortAudio::callbackProcess prepare %1", + ScopedTimer t(QStringLiteral("SoundDevicePortAudio::callbackProcess prepare %1"), m_deviceId.name); m_pSoundManager->onDeviceOutputCallback(framesPerBuffer); } diff --git a/src/soundio/sounddeviceportaudio.cpp b/src/soundio/sounddeviceportaudio.cpp index 5b413ac6012..c7989336c13 100644 --- a/src/soundio/sounddeviceportaudio.cpp +++ b/src/soundio/sounddeviceportaudio.cpp @@ -984,7 +984,7 @@ int SoundDevicePortAudio::callbackProcessClkRef( // Send audio from the soundcard's input off to the SoundManager... if (in) { - ScopedTimer t(u"SoundDevicePortAudio::callbackProcess input %1", + ScopedTimer t(QStringLiteral("SoundDevicePortAudio::callbackProcess input %1"), m_deviceId.debugName()); composeInputBuffer(in, framesPerBuffer, 0, m_inputParams.channelCount); m_pSoundManager->pushInputBuffers(m_audioInputs, framesPerBuffer); @@ -993,13 +993,13 @@ int SoundDevicePortAudio::callbackProcessClkRef( m_pSoundManager->readProcess(framesPerBuffer); { - ScopedTimer t(u"SoundDevicePortAudio::callbackProcess prepare %1", + ScopedTimer t(QStringLiteral("SoundDevicePortAudio::callbackProcess prepare %1"), m_deviceId.debugName()); m_pSoundManager->onDeviceOutputCallback(framesPerBuffer); } if (out) { - ScopedTimer t(u"SoundDevicePortAudio::callbackProcess output %1", + ScopedTimer t(QStringLiteral("SoundDevicePortAudio::callbackProcess output %1"), m_deviceId.debugName()); if (m_outputParams.channelCount <= 0) { diff --git a/src/sources/soundsourcemodplug.cpp b/src/sources/soundsourcemodplug.cpp index 670895f82ac..f747e8b3db9 100644 --- a/src/sources/soundsourcemodplug.cpp +++ b/src/sources/soundsourcemodplug.cpp @@ -118,7 +118,7 @@ SoundSourceModPlug::importTrackMetadataAndCoverImage( SoundSource::OpenResult SoundSourceModPlug::tryOpen( OpenMode /*mode*/, const OpenParams& /*config*/) { - ScopedTimer t(u"SoundSourceModPlug::open()"); + ScopedTimer t(QStringLiteral("SoundSourceModPlug::open()")); // read module file to byte array const QString fileName(getLocalFileName()); diff --git a/src/util/timer.h b/src/util/timer.h index 3118d218f9c..e20d3195601 100644 --- a/src/util/timer.h +++ b/src/util/timer.h @@ -8,6 +8,7 @@ #include "util/duration.h" #include "util/performancetimer.h" #include "util/stat.h" +#include "util/stringformat.h" static constexpr Stat::ComputeFlags kDefaultComputeFlags = Stat::COUNT | Stat::SUM | Stat::AVERAGE | Stat::MAX | Stat::MIN | Stat::SAMPLE_VARIANCE; @@ -39,40 +40,49 @@ class Timer { // TODO: replace with std::experimental::scope_exit once stabilized class ScopedTimer { public: - ScopedTimer(QStringView key, - Stat::ComputeFlags compute = kDefaultComputeFlags) - : ScopedTimer(key, QStringView(), compute) { - } - ScopedTimer(QStringView key, - int i, - Stat::ComputeFlags compute = kDefaultComputeFlags) - : ScopedTimer(key, - CmdlineArgs::Instance().getDeveloper() - ? QString::number(i) - : QStringView(), - compute) { - } - - ScopedTimer(QStringView key, QStringView arg, Stat::ComputeFlags compute = kDefaultComputeFlags) + // Allows the timer to contain a format string which is only assembled + // when we're not in `--developer` mode. + /// @param compute Flags to use for the Stat::ComputeFlags (can be omitted) + /// @param key The format string as QStringLiteral to identify the timer + /// @param args The arguments to pass to the format string + template + ScopedTimer(Stat::ComputeFlags compute, T&& key, Ts&&... args) : m_maybeTimer(std::nullopt) { + // we take a T here so we can detect the type and warn the user accordingly + // instead of paying for an implicit runtime conversion at the call site + static_assert(std::is_same_v, + "only QString is supported as key type. Wrap it in u\"\"" + "_s or QStringLiteral() " + "to avoid runtime UTF-16 conversion."); + // we can now assume that T is a QString. if (!CmdlineArgs::Instance().getDeveloper()) { - return; + return; // leave timer in cancelled state } -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) - QString strKey = arg.isEmpty() ? key.toString() : key.arg(arg); -#else - QString strKey = arg.isEmpty() ? key.toString() : key.toString().arg(arg); -#endif - m_maybeTimer = std::make_optional(std::move(strKey), compute); + DEBUG_ASSERT(key.capacity() == 0); + m_maybeTimer = std::make_optional(([&]() { + // only try to call QString::arg when we've been given parameters + if constexpr (sizeof...(args) > 0) { + return key.arg(convertToQStringConvertible(std::forward(args))...); + } else { + return key; + } + })(), + compute); m_maybeTimer->start(); } + template + ScopedTimer(T&& key, Ts&&... args) + : ScopedTimer(kDefaultComputeFlags, std::forward(key), std::forward(args)...) { + } + ~ScopedTimer() noexcept { if (m_maybeTimer) { m_maybeTimer->elapsed(true); } } + // copying would technically be possible, but likely not intended ScopedTimer(const ScopedTimer&) = delete; ScopedTimer& operator=(const ScopedTimer&) = delete; diff --git a/src/vinylcontrol/vinylcontrolprocessor.cpp b/src/vinylcontrol/vinylcontrolprocessor.cpp index e6231d6042d..0c8ae04b6ba 100644 --- a/src/vinylcontrol/vinylcontrolprocessor.cpp +++ b/src/vinylcontrol/vinylcontrolprocessor.cpp @@ -204,7 +204,7 @@ bool VinylControlProcessor::deckConfigured(int index) const { void VinylControlProcessor::receiveBuffer(const AudioInput& input, const CSAMPLE* pBuffer, unsigned int nFrames) { - ScopedTimer t(u"VinylControlProcessor::receiveBuffer"); + ScopedTimer t(QStringLiteral("VinylControlProcessor::receiveBuffer")); if (input.getType() != AudioPathType::VinylControl) { qDebug() << "WARNING: AudioInput type is not VINYLCONTROL. Ignoring incoming buffer."; return; diff --git a/src/vinylcontrol/vinylcontrolxwax.cpp b/src/vinylcontrol/vinylcontrolxwax.cpp index 762d3cb1f60..f4a03333e6c 100644 --- a/src/vinylcontrol/vinylcontrolxwax.cpp +++ b/src/vinylcontrol/vinylcontrolxwax.cpp @@ -202,7 +202,7 @@ bool VinylControlXwax::writeQualityReport(VinylSignalQualityReport* pReport) { void VinylControlXwax::analyzeSamples(CSAMPLE* pSamples, size_t nFrames) { - ScopedTimer t(u"VinylControlXwax::analyzeSamples"); + ScopedTimer t(QStringLiteral("VinylControlXwax::analyzeSamples")); auto gain = static_cast(m_pVinylControlInputGain->get()); // We only support amplifying with the VC pre-amp. diff --git a/src/waveform/renderers/waveformrendererendoftrack.cpp b/src/waveform/renderers/waveformrendererendoftrack.cpp index e512b7a783d..330d0101fcc 100644 --- a/src/waveform/renderers/waveformrendererendoftrack.cpp +++ b/src/waveform/renderers/waveformrendererendoftrack.cpp @@ -57,7 +57,7 @@ void WaveformRendererEndOfTrack::draw(QPainter* painter, return; } - // ScopedTimer t(u"WaveformRendererEndOfTrack::draw"); + // ScopedTimer t(QStringLiteral("WaveformRendererEndOfTrack::draw")); const int elapsed = m_timer.elapsed().toIntegerMillis() % kBlinkingPeriodMillis; diff --git a/src/waveform/waveformwidgetfactory.cpp b/src/waveform/waveformwidgetfactory.cpp index 4fc216b0589..139670e3e85 100644 --- a/src/waveform/waveformwidgetfactory.cpp +++ b/src/waveform/waveformwidgetfactory.cpp @@ -757,7 +757,7 @@ void WaveformWidgetFactory::notifyZoomChange(WWaveformViewer* viewer) { } void WaveformWidgetFactory::renderSelf() { - ScopedTimer t(u"WaveformWidgetFactory::render() %1waveforms", + ScopedTimer t(QStringLiteral("WaveformWidgetFactory::render() %1waveforms"), static_cast(m_waveformWidgetHolders.size())); if (!m_skipRender) { @@ -831,7 +831,7 @@ void WaveformWidgetFactory::render() { } void WaveformWidgetFactory::swapSelf() { - ScopedTimer t(u"WaveformWidgetFactory::swap() %1waveforms", + ScopedTimer t(QStringLiteral("WaveformWidgetFactory::swap() %1waveforms"), static_cast(m_waveformWidgetHolders.size())); // Do this in an extra slot to be sure to hit the desired interval diff --git a/src/widget/woverview.cpp b/src/widget/woverview.cpp index 794db86a9f4..24159cbc37d 100644 --- a/src/widget/woverview.cpp +++ b/src/widget/woverview.cpp @@ -577,7 +577,7 @@ void WOverview::leaveEvent(QEvent* pEvent) { void WOverview::paintEvent(QPaintEvent* pEvent) { Q_UNUSED(pEvent); - ScopedTimer t(u"WOverview::paintEvent"); + ScopedTimer t(QStringLiteral("WOverview::paintEvent")); QPainter painter(this); painter.fillRect(rect(), m_backgroundColor); diff --git a/src/widget/woverviewhsv.cpp b/src/widget/woverviewhsv.cpp index 8f20884b1d2..c818bcf7094 100644 --- a/src/widget/woverviewhsv.cpp +++ b/src/widget/woverviewhsv.cpp @@ -18,7 +18,7 @@ WOverviewHSV::WOverviewHSV( } bool WOverviewHSV::drawNextPixmapPart() { - ScopedTimer t(u"WOverviewHSV::drawNextPixmapPart"); + ScopedTimer t(QStringLiteral("WOverviewHSV::drawNextPixmapPart")); //qDebug() << "WOverview::drawNextPixmapPart()"; diff --git a/src/widget/woverviewlmh.cpp b/src/widget/woverviewlmh.cpp index 72ad03124a5..30f2f4aad01 100644 --- a/src/widget/woverviewlmh.cpp +++ b/src/widget/woverviewlmh.cpp @@ -18,7 +18,7 @@ WOverviewLMH::WOverviewLMH( } bool WOverviewLMH::drawNextPixmapPart() { - ScopedTimer t(u"WOverviewLMH::drawNextPixmapPart"); + ScopedTimer t(QStringLiteral("WOverviewLMH::drawNextPixmapPart")); //qDebug() << "WOverview::drawNextPixmapPart()"; diff --git a/src/widget/woverviewrgb.cpp b/src/widget/woverviewrgb.cpp index 5cc8ced168e..e9e03145377 100644 --- a/src/widget/woverviewrgb.cpp +++ b/src/widget/woverviewrgb.cpp @@ -17,7 +17,7 @@ WOverviewRGB::WOverviewRGB( } bool WOverviewRGB::drawNextPixmapPart() { - ScopedTimer t(u"WOverviewRGB::drawNextPixmapPart"); + ScopedTimer t(QStringLiteral("WOverviewRGB::drawNextPixmapPart")); //qDebug() << "WOverview::drawNextPixmapPart()"; diff --git a/src/widget/wvumeterbase.cpp b/src/widget/wvumeterbase.cpp index 18ea00544c3..dca9eb122a0 100644 --- a/src/widget/wvumeterbase.cpp +++ b/src/widget/wvumeterbase.cpp @@ -181,7 +181,7 @@ void WVuMeterBase::render(VSyncThread* vSyncThread) { return; } - ScopedTimer t(u"WVuMeterBase::render"); + ScopedTimer t(QStringLiteral("WVuMeterBase::render")); updateState(vSyncThread->sinceLastSwap()); diff --git a/src/widget/wvumeterlegacy.cpp b/src/widget/wvumeterlegacy.cpp index 2d38917c793..97a065b0ae9 100644 --- a/src/widget/wvumeterlegacy.cpp +++ b/src/widget/wvumeterlegacy.cpp @@ -165,7 +165,7 @@ void WVuMeterLegacy::showEvent(QShowEvent* e) { } void WVuMeterLegacy::paintEvent(QPaintEvent* /*unused*/) { - ScopedTimer t(u"WVuMeterLegacy::paintEvent"); + ScopedTimer t(QStringLiteral("WVuMeterLegacy::paintEvent")); QPainter p(this);