diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-08-26 08:29:50 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-08-26 10:42:37 +0000 |
commit | c47d1d74a7e78c66332d72fa3d313d71f9c68dd2 (patch) | |
tree | 1d07a5940fd24cfd8908b52e87470ca2202d215f /src/platformsupport/input/evdevtablet | |
parent | 919978afaeb50d5d8c4cc7cbd2d3d99415a47923 (diff) |
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 <edward.welbourne@qt.io>
Diffstat (limited to 'src/platformsupport/input/evdevtablet')
-rw-r--r-- | src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp b/src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp index 00a8c7a65d..89a60df98d 100644 --- a/src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp +++ b/src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp @@ -85,8 +85,8 @@ QEvdevTabletManager::QEvdevTabletManager(const QString &key, const QString &spec qCDebug(qLcEvdevTablet) << "evdevtablet: Using device discovery"; m_deviceDiscovery = QDeviceDiscovery::create(QDeviceDiscovery::Device_Tablet, 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))); |