summaryrefslogtreecommitdiffstats
path: root/src/plugins/avfoundation
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/avfoundation
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/avfoundation')
-rw-r--r--src/plugins/avfoundation/camera/avfvideoencodersettingscontrol.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/avfoundation/camera/avfvideoencodersettingscontrol.mm b/src/plugins/avfoundation/camera/avfvideoencodersettingscontrol.mm
index bbb16e709..ddf833fd3 100644
--- a/src/plugins/avfoundation/camera/avfvideoencodersettingscontrol.mm
+++ b/src/plugins/avfoundation/camera/avfvideoencodersettingscontrol.mm
@@ -76,7 +76,7 @@ static bool format_supports_framerate(AVCaptureDeviceFormat *format, qreal fps)
static bool real_list_contains(const QList<qreal> &list, qreal value)
{
- Q_FOREACH (qreal r, list) {
+ for (qreal r : list) {
if (qFuzzyCompare(r, value))
return true;
}