aboutsummaryrefslogtreecommitdiff
path: root/src/core/kconfiggroup.cpp
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2021-02-23 00:37:11 +0200
committerAhmad Samir <a.samirh78@gmail.com>2021-03-06 01:35:08 +0200
commit9d87348260316af729892c58bc29f159a173abf1 (patch)
treeaf81edda4bf441239f4ccc66dbfb533c5be26a47 /src/core/kconfiggroup.cpp
parentee35bdce8f6b08922b4c9e0c0c838e5f2c4a79ad (diff)
downloadkconfig-9d87348260316af729892c58bc29f159a173abf1.tar.gz
kconfig-9d87348260316af729892c58bc29f159a173abf1.tar.bz2
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
Diffstat (limited to 'src/core/kconfiggroup.cpp')
-rw-r--r--src/core/kconfiggroup.cpp4
1 files changed, 2 insertions, 2 deletions
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<QByteArray> &list)
QByteArray value;
if (!list.isEmpty()) {
- QList<QByteArray>::ConstIterator it = list.constBegin();
- const QList<QByteArray>::ConstIterator end = list.constEnd();
+ auto it = list.cbegin();
+ const auto end = list.cend();
value = QByteArray(*it).replace('\\', QByteArrayLiteral("\\\\")).replace(',', QByteArrayLiteral("\\,"));