diff options
author | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2010-02-05 13:29:53 (GMT) |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2010-02-05 13:47:07 (GMT) |
commit | cc1f88b869f23bb2855c1ada0fc6187ca21413b6 (patch) | |
tree | 0785b2ccd3fde321a3a514d9d636df546ee59649 /src/gui/styles | |
parent | 919a8b360950718c68b4da68aeb22a402f99ae3b (diff) | |
download | Qt-cc1f88b869f23bb2855c1ada0fc6187ca21413b6.zip Qt-cc1f88b869f23bb2855c1ada0fc6187ca21413b6.tar.gz Qt-cc1f88b869f23bb2855c1ada0fc6187ca21413b6.tar.bz2 |
A few trivial optimizations
Don't use QHash/QMap::values/keys unnecessarily.
Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qs60style_simulated.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp index bd43eb7..f1da1c5 100644 --- a/src/gui/styles/qs60style_simulated.cpp +++ b/src/gui/styles/qs60style_simulated.cpp @@ -94,12 +94,12 @@ bool saveThemeToBlob(const QString &themeBlob, dataOut << color; } - const int picturesCount = partPictures.count(); - dataOut << picturesCount; - foreach (const QString &key, partPictures.keys()) { - const QPicture picture = partPictures.value(key); - dataOut << key; - dataOut << picture; + dataOut << partPictures.count(); + QHashIterator i(partPictures); + while (i.hasNext()) { + i.next(); + dataOut << i.key(); + dataOut << i.value(); // the QPicture } QDataStream blobOut(&blob); |