summaryrefslogtreecommitdiffstats
path: root/examples/dbus/listnames/listnames.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dbus/listnames/listnames.cpp')
-rw-r--r--examples/dbus/listnames/listnames.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/dbus/listnames/listnames.cpp b/examples/dbus/listnames/listnames.cpp
index c0afec062d..50203da73d 100644
--- a/examples/dbus/listnames/listnames.cpp
+++ b/examples/dbus/listnames/listnames.cpp
@@ -62,7 +62,8 @@ void method1()
qDebug() << "Error:" << reply.error().message();
exit(1);
}
- foreach (QString name, reply.value())
+ const QStringList values = reply.value();
+ for (const QString &name : values)
qDebug() << name;
}