aboutsummaryrefslogtreecommitdiff
path: root/src/core/kcoreconfigskeleton_p.h
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/kcoreconfigskeleton_p.h
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/kcoreconfigskeleton_p.h')
-rw-r--r--src/core/kcoreconfigskeleton_p.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/core/kcoreconfigskeleton_p.h b/src/core/kcoreconfigskeleton_p.h
index d854cc43..a7417430 100644
--- a/src/core/kcoreconfigskeleton_p.h
+++ b/src/core/kcoreconfigskeleton_p.h
@@ -21,10 +21,7 @@ public:
}
~KCoreConfigSkeletonPrivate()
{
- KConfigSkeletonItem::List::ConstIterator it;
- for (it = mItems.constBegin(); it != mItems.constEnd(); ++it) {
- delete *it;
- }
+ qDeleteAll(mItems);
}
QString mCurrentGroup;