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/kconfigdata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/kconfigdata.cpp') diff --git a/src/core/kconfigdata.cpp b/src/core/kconfigdata.cpp index 8ceea7ee..ada7125f 100644 --- a/src/core/kconfigdata.cpp +++ b/src/core/kconfigdata.cpp @@ -312,7 +312,7 @@ bool KEntryMap::revertEntry(const QByteArray &group, const QByteArray &key, KEnt KEntryKey defaultKey(entry.key()); defaultKey.bDefault = true; // qDebug() << "looking up default entry with key=" << defaultKey; - const ConstIterator defaultEntry = constFind(defaultKey); + const auto defaultEntry = constFind(defaultKey); if (defaultEntry != constEnd()) { Q_ASSERT(defaultEntry.key().bDefault); // qDebug() << "found, update entry"; -- cgit v1.2.1