diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-01-01 15:18:57 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-02-02 12:49:19 +0000 |
commit | df39627fa33392a71ab79aadaa57e5c5e650e79e (patch) | |
tree | 83a776716c9b8d9bea2e0a5c3282aa5e0cbcdb6d /examples/dbus/listnames | |
parent | 7847e6bc02552fa7fc7f518e5cb3336f667b5a6d (diff) |
Examples: cleanup foreach usage
Replace deprecated foreach macro with range-based for loop
Change-Id: If919ba1d1d4acddfc1c5460ce7aebf8c49e3ac38
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'examples/dbus/listnames')
-rw-r--r-- | examples/dbus/listnames/listnames.cpp | 3 |
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; } |