summaryrefslogtreecommitdiffstats
path: root/src/plugins/common/evr
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-07-11 09:54:15 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-07-11 09:15:13 +0000
commit940306f134ded0a323821526d09f12670495b29c (patch)
treebacd1bfdcb689810739f3b2eb0fc1402d38434d1 /src/plugins/common/evr
parent962371cbe3f01f3c30991522de1d03c8dfd77164 (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 'src/plugins/common/evr')
-rw-r--r--src/plugins/common/evr/evrcustompresenter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/common/evr/evrcustompresenter.cpp b/src/plugins/common/evr/evrcustompresenter.cpp
index 84786e9a9..3de8d3ac3 100644
--- a/src/plugins/common/evr/evrcustompresenter.cpp
+++ b/src/plugins/common/evr/evrcustompresenter.cpp
@@ -1029,7 +1029,7 @@ void EVRCustomPresenter::supportedFormatsChanged()
m_canRenderToSurface = true;
} else {
formats = m_surface->supportedPixelFormats(QAbstractVideoBuffer::NoHandle);
- Q_FOREACH (QVideoFrame::PixelFormat format, formats) {
+ for (QVideoFrame::PixelFormat format : qAsConst(formats)) {
if (SUCCEEDED(m_presentEngine->checkFormat(qt_evr_D3DFormatFromPixelFormat(format)))) {
m_canRenderToSurface = true;
break;