diff options
author | Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> | 2023-05-05 16:05:35 +0200 |
---|---|---|
committer | Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> | 2023-05-15 14:02:47 +0200 |
commit | 0f37c477135da0a4b91b7da167bf50d2b0bb0540 (patch) | |
tree | 373af6b6f9aca908cff03b6df72d6caf3c2bd46a /src/dbus/qdbusmarshaller.cpp | |
parent | 4768fcf836f1eb0f59ab62a29eb821b433a239c1 (diff) |
QtDBus: Convert some loops to ranged for loops
Convert some loops that are using Java-style iterators into
ranged for loops for better readability.
Change-Id: I14f6339608d201fe06a753be236db52815cbf5c4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/dbus/qdbusmarshaller.cpp')
-rw-r--r-- | src/dbus/qdbusmarshaller.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/dbus/qdbusmarshaller.cpp b/src/dbus/qdbusmarshaller.cpp index e3fb298fbe..480b19774e 100644 --- a/src/dbus/qdbusmarshaller.cpp +++ b/src/dbus/qdbusmarshaller.cpp @@ -206,10 +206,8 @@ inline void QDBusMarshaller::append(const QStringList &arg) QDBusMarshaller sub(capabilities); open(sub, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING_AS_STRING); - QStringList::ConstIterator it = arg.constBegin(); - QStringList::ConstIterator end = arg.constEnd(); - for ( ; it != end; ++it) - sub.append(*it); + for (const QString &s : arg) + sub.append(s); // don't call sub.close(): it auto-closes } |