Commit ccdcbc55 authored by Marc Mutz's avatar Marc Mutz Committed by Oswald Buddenhagen

qmake: don't iterate over .keys()

... iterate over the container itself instead. Avoids
temporary QList creation as well as the lookup cost
when actually calling value(key).

Change-Id: Icac867c30e63863cfa44a382eedd4d6df2070a59
Reviewed-by: default avatarLars Knoll <>
(cherry picked from qtbase/c9cb20c01a0f3fa93ff9f79fd7ea3f53939497c4)
Reviewed-by: default avatarMarc Mutz <>
Reviewed-by: Jake Petroules's avatarJake Petroules <>
parent 5c812f77
......@@ -303,8 +303,8 @@ static void addJsonArray(const QJsonArray &array, const QString &keyPrefix, ProV
static void addJsonObject(const QJsonObject &object, const QString &keyPrefix, ProValueMap *map)
foreach (const QString &key, object.keys())
addJsonValue(object.value(key), keyPrefix + key, map);
for (auto it = object.begin(), end = object.end(); it != end; ++it)
addJsonValue(it.value(), keyPrefix + it.key(), map);
insertJsonKeyValue(keyPrefix + QLatin1String("_KEYS_"), object.keys(), map);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment