summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-10-06 11:36:13 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-10-07 17:17:25 +0200
commitf119db13e9c6d2f1bf26dd59b1bd111e2d0a7c95 (patch)
treecb71987260ec6b86e6896ef02fd30e6d7a3efa02 /examples
parentbf9a1e31a194adfdbb7116455633b9046b34504c (diff)
Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I25cda1e10154e11a51a17c6ca2b47ce90b26f90e Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/multimedia/audiorecorder/audiorecorder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/multimedia/audiorecorder/audiorecorder.cpp b/examples/multimedia/audiorecorder/audiorecorder.cpp
index e9677f738..cde21aa12 100644
--- a/examples/multimedia/audiorecorder/audiorecorder.cpp
+++ b/examples/multimedia/audiorecorder/audiorecorder.cpp
@@ -213,7 +213,7 @@ void AudioRecorder::updateFormats()
void AudioRecorder::clearAudioLevels()
{
- for (auto m_audioLevel : qAsConst(m_audioLevels))
+ for (auto m_audioLevel : std::as_const(m_audioLevels))
m_audioLevel->setLevel(0);
}