diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-11-11 16:26:04 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-11-18 22:01:35 +0100 |
commit | 21a75150e38167fcadc8ad679cd75174356da8e5 (patch) | |
tree | e1cc85b95f6003ad3ddf758ecb02500df81a2d90 /examples | |
parent | d8dc0de7ba43b2a6a30c349e08b5c2a0aea3306c (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.
This is a 6.4 re-run of the script we ran in dev, in order to avoid
conflicts between the branches when cherry-picking.
Change-Id: I5eca3df3179dfb2b2682c75a479ba9a4259cc703
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/multimedia/audiorecorder/audiorecorder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/multimedia/audiorecorder/audiorecorder.cpp b/examples/multimedia/audiorecorder/audiorecorder.cpp index 81666f432..df17e8767 100644 --- a/examples/multimedia/audiorecorder/audiorecorder.cpp +++ b/examples/multimedia/audiorecorder/audiorecorder.cpp @@ -207,7 +207,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); } |