diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-07-04 10:56:08 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-07-04 11:45:36 +0200 |
commit | 962371cbe3f01f3c30991522de1d03c8dfd77164 (patch) | |
tree | bcb0920f7b5a43c7b522c2b5113923115926b089 /src/plugins/gstreamer/mediacapture | |
parent | a0cdd6f79222d06a0fc41caa1fbb35acb20d4961 (diff) |
Eradicate Java-style iterators and mark the module free of them
Java-style iterators are scheduled to be deprecated, or at the very
least banned from use in Qt's own implementation.
Ditto for QLinkedList.
Change-Id: I5471c293a7a050b92db47f7aeac15dd05bd46650
Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
Diffstat (limited to 'src/plugins/gstreamer/mediacapture')
-rw-r--r-- | src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp | 4 | ||||
-rw-r--r-- | src/plugins/gstreamer/mediacapture/qgstreamervideoencode.cpp | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp b/src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp index 40294214a..361a2369a 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp +++ b/src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp @@ -214,9 +214,7 @@ GstElement *QGstreamerAudioEncode::createEncoder() } QMap<QString, QVariant> options = m_options.value(codec); - QMapIterator<QString,QVariant> it(options); - while (it.hasNext()) { - it.next(); + for (auto it = options.cbegin(), end = options.cend(); it != end; ++it) { QString option = it.key(); QVariant value = it.value(); diff --git a/src/plugins/gstreamer/mediacapture/qgstreamervideoencode.cpp b/src/plugins/gstreamer/mediacapture/qgstreamervideoencode.cpp index 6b4dbe4b7..674e1034e 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreamervideoencode.cpp +++ b/src/plugins/gstreamer/mediacapture/qgstreamervideoencode.cpp @@ -204,9 +204,7 @@ GstElement *QGstreamerVideoEncode::createEncoder() } QMap<QString,QVariant> options = m_options.value(codec); - QMapIterator<QString,QVariant> it(options); - while (it.hasNext()) { - it.next(); + for (auto it = options.cbegin(), end = options.cend(); it != end; ++it) { QString option = it.key(); QVariant value = it.value(); |