summaryrefslogtreecommitdiffstats
path: root/src/plugins/canbus/tinycan
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2016-09-23 20:36:52 +0200
committerAndré Hartmann <aha_1980@gmx.de>2017-01-11 13:26:25 +0000
commit8595d3a1758b65b2e30770c5491e144ecfcb610c (patch)
treede423f4a05d680cef19a3164dcfa2acef1aebca7 /src/plugins/canbus/tinycan
parent403d1004b61eb8d0005ee952b73c77d944e83f77 (diff)
Eradicate Q_FOREACH loops and mark the module as Q_FOREACH-free
Change-Id: I4ec52799514b750c158e3cb8e6c38d1f1063c6c5 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/plugins/canbus/tinycan')
-rw-r--r--src/plugins/canbus/tinycan/tinycanbackend.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/canbus/tinycan/tinycanbackend.cpp b/src/plugins/canbus/tinycan/tinycanbackend.cpp
index 390adee..ea33177 100644
--- a/src/plugins/canbus/tinycan/tinycanbackend.cpp
+++ b/src/plugins/canbus/tinycan/tinycanbackend.cpp
@@ -109,7 +109,7 @@ static void DRV_CALLBACK_TYPE canRxEventCallback(quint32 index, TCanMsg *frame,
Q_UNUSED(count);
QMutexLocker lock(&channelsGuard);
- foreach (TinyCanBackendPrivate *p, *qChannels()) {
+ for (TinyCanBackendPrivate *p : qAsConst(*qChannels())) {
if (p->channelIndex == int(index)) {
p->startRead();
return;
@@ -506,7 +506,8 @@ bool TinyCanBackend::open()
}
// apply all stored configurations
- foreach (int key, configurationKeys()) {
+ const auto keys = configurationKeys();
+ for (int key : keys) {
const QVariant param = configurationParameter(key);
const bool success = d->setConfigurationParameter(key, param);
if (!success) {