summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/audio-visualizer-qml
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-05-16 09:20:43 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-05-22 16:13:12 +0200
commit0570d73b615983b861eedcfced755d20114d1bc0 (patch)
treee1829639f11efa8cb092bb2d5df645bf11e662e5 /examples/qt3d/audio-visualizer-qml
parentc5395497a72805bd4dd9f092f52cc9bfebeb922b (diff)
Eradicate Q_FOREACH loops and mark the module clean
The only noteworth change is where a loop around spy.events modified the container using takeFirst(). There was no reason to do so, so it was changed to use the loop variable instead of the result of taking. Change-Id: I02c62a7c2efc5d042c6e669fe5daddd7da7e85d2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples/qt3d/audio-visualizer-qml')
-rw-r--r--examples/qt3d/audio-visualizer-qml/touchsettings.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/qt3d/audio-visualizer-qml/touchsettings.cpp b/examples/qt3d/audio-visualizer-qml/touchsettings.cpp
index 160dc6a76..312dfa7e6 100644
--- a/examples/qt3d/audio-visualizer-qml/touchsettings.cpp
+++ b/examples/qt3d/audio-visualizer-qml/touchsettings.cpp
@@ -62,8 +62,9 @@ bool TouchSettings::isHoverEnabled() const
#if defined(Q_OS_IOS) || defined(Q_OS_ANDROID) || defined(Q_OS_QNX) || defined(Q_OS_WINRT)
return false;
#else
+ const auto devices = QTouchDevice::devices();
bool isTouch = false;
- foreach (const QTouchDevice *dev, QTouchDevice::devices())
+ for (const QTouchDevice *dev : devices)
if (dev->type() == QTouchDevice::TouchScreen) {
isTouch = true;
break;