From c47d1d74a7e78c66332d72fa3d313d71f9c68dd2 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 26 Aug 2016 08:29:50 +0200 Subject: platformsupport: eradicate some easy Q_FOREACH loops All loops trivially not modifying the iterated-over container. Saves ~9.4KiB in text size across all plugins and libs (statically) linking in QtPlatformSupport (optimized GCC 6.1 Linux AMD 64 build). Change-Id: I2d91da1f78d9b33d4c5e4a1627560d8e705a9b9a Reviewed-by: Edward Welbourne --- src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/platformsupport/input/evdevtouch') diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp index 2de0816ef5..d0c6c10224 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp @@ -85,8 +85,8 @@ QEvdevTouchManager::QEvdevTouchManager(const QString &key, const QString &specif qCDebug(qLcEvdevTouch) << "evdevtouch: Using device discovery"; m_deviceDiscovery = QDeviceDiscovery::create(QDeviceDiscovery::Device_Touchpad | QDeviceDiscovery::Device_Touchscreen, this); if (m_deviceDiscovery) { - QStringList devices = m_deviceDiscovery->scanConnectedDevices(); - foreach (const QString &device, devices) + const QStringList devices = m_deviceDiscovery->scanConnectedDevices(); + for (const QString &device : devices) addDevice(device); connect(m_deviceDiscovery, SIGNAL(deviceDetected(QString)), this, SLOT(addDevice(QString))); connect(m_deviceDiscovery, SIGNAL(deviceRemoved(QString)), this, SLOT(removeDevice(QString))); -- cgit v1.2.3