diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-07-11 09:54:15 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-07-11 09:15:13 +0000 |
commit | 940306f134ded0a323821526d09f12670495b29c (patch) | |
tree | bacd1bfdcb689810739f3b2eb0fc1402d38434d1 /tests/auto/integration/qdeclarativevideooutput/tst_qdeclarativevideooutput.cpp | |
parent | 962371cbe3f01f3c30991522de1d03c8dfd77164 (diff) |
Eradicate all but one Q_FOREACH loop
Q_FOREACH is going to be deprecated, or at the very least banned from
use in Qt code.
All these are trivial in the sense that the loop body clearly doesn't
modify the container over which we iterate, and that the container is
const, or trivially marked as such.
In one case, replaced Q_FOREACH + delete + clear() with
qDeleteAll(qExchange()), in three others, replaced Qt containers with
statically-known content with plain C arrays.
Change-Id: I718821811370f0cfefac3893283572d39a7d957d
Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
Diffstat (limited to 'tests/auto/integration/qdeclarativevideooutput/tst_qdeclarativevideooutput.cpp')
-rw-r--r-- | tests/auto/integration/qdeclarativevideooutput/tst_qdeclarativevideooutput.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/integration/qdeclarativevideooutput/tst_qdeclarativevideooutput.cpp b/tests/auto/integration/qdeclarativevideooutput/tst_qdeclarativevideooutput.cpp index 5b9fdd03c..798b63f96 100644 --- a/tests/auto/integration/qdeclarativevideooutput/tst_qdeclarativevideooutput.cpp +++ b/tests/auto/integration/qdeclarativevideooutput/tst_qdeclarativevideooutput.cpp @@ -280,11 +280,11 @@ void tst_QDeclarativeVideoOutput::surfaceSource() QVERIFY(holder.videoSurface() != 0); // Now we could do things with the surface.. - QList<QVideoFrame::PixelFormat> formats = holder.videoSurface()->supportedPixelFormats(); + const QList<QVideoFrame::PixelFormat> formats = holder.videoSurface()->supportedPixelFormats(); QVERIFY(formats.count() > 0); // See if we can start and stop each pixel format (..) - foreach (QVideoFrame::PixelFormat format, formats) { + for (QVideoFrame::PixelFormat format : formats) { QVideoSurfaceFormat surfaceFormat(QSize(200,100), format); QVERIFY(holder.videoSurface()->isFormatSupported(surfaceFormat)); // This does kind of depend on node factories |