From 9d87348260316af729892c58bc29f159a173abf1 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Tue, 23 Feb 2021 00:37:11 +0200 Subject: Minor code optimisation - Use more range-for loops where appropriate - Use auto instead of the usually-long iterator type names - Use cbegin/cend(), to match the std:: containers, less confusion - Use qDeleteAll instead of a for loop - Make a QRE with a long-ish pattern static NO_CHANGELOG --- src/core/kconfiggroup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/kconfiggroup.cpp') diff --git a/src/core/kconfiggroup.cpp b/src/core/kconfiggroup.cpp index 8fcfafe7..c065be81 100644 --- a/src/core/kconfiggroup.cpp +++ b/src/core/kconfiggroup.cpp @@ -126,8 +126,8 @@ QByteArray KConfigGroupPrivate::serializeList(const QList &list) QByteArray value; if (!list.isEmpty()) { - QList::ConstIterator it = list.constBegin(); - const QList::ConstIterator end = list.constEnd(); + auto it = list.cbegin(); + const auto end = list.cend(); value = QByteArray(*it).replace('\\', QByteArrayLiteral("\\\\")).replace(',', QByteArrayLiteral("\\,")); -- cgit v1.2.1