summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qsettings_p.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-05-20 19:03:42 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-06-20 04:39:15 +0000
commit657e8ffb9ecdf451b9db85dd5dfbc820d2ac3ca5 (patch)
tree03ba03e805207af7ca7e6d6274a06e2ee410719c /src/corelib/io/qsettings_p.h
parent669487fe9549a896ea4ec3c63fa7ad8585e74b63 (diff)
QSettings: replace a QMap with a QList
The QMap<QString, QString> was only used to create a sorted, unique list of keys. The associativeness was never used (the value was always the null QString). Better to use a QStringList instead and sort-unique the whole thing at the end. Saves ~1.6K in text size on Linux AMD64 GCC 4.9 release C++11 builds, and a tremendous amount of heap allocations. Change-Id: Idf749dd8924b3894e436aa1cee0304002b898975 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/io/qsettings_p.h')
-rw-r--r--src/corelib/io/qsettings_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qsettings_p.h b/src/corelib/io/qsettings_p.h
index 004751182c..534527ed5a 100644
--- a/src/corelib/io/qsettings_p.h
+++ b/src/corelib/io/qsettings_p.h
@@ -211,7 +211,7 @@ public:
const QString &organization, const QString &application);
static QSettingsPrivate *create(const QString &fileName, QSettings::Format format);
- static void processChild(QStringRef key, ChildSpec spec, QMap<QString, QString> &result);
+ static void processChild(QStringRef key, ChildSpec spec, QStringList &result);
// Variant streaming functions
static QStringList variantListToStringList(const QVariantList &l);