summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmapcache.cpp
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-06-04 10:36:16 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-06-04 10:37:07 (GMT)
commitc2bad7dba5eccd5450eaf7eddaebc75b8410fa95 (patch)
treef7af3b782dfda7bdea647621b715d7dfd8684762 /src/gui/image/qpixmapcache.cpp
parentba4d556e7c9f0f6f2c02893326eec76c21f46fc7 (diff)
downloadQt-c2bad7dba5eccd5450eaf7eddaebc75b8410fa95.zip
Qt-c2bad7dba5eccd5450eaf7eddaebc75b8410fa95.tar.gz
Qt-c2bad7dba5eccd5450eaf7eddaebc75b8410fa95.tar.bz2
Add an extra explanation for the API extension.
Reviewed-by:David Boddie
Diffstat (limited to 'src/gui/image/qpixmapcache.cpp')
-rw-r--r--src/gui/image/qpixmapcache.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 82b42b4..bdcddfd 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -65,7 +65,10 @@ QT_BEGIN_NAMESPACE
object for caching the pixmaps.
The cache associates a pixmap with a string as a key or with a QPixmapCache::Key.
- The QPixmapCache::Key is faster than using strings as key.
+ The QPixmapCache::Key is faster than using strings as key. The string API is
+ very convenient for complex keys but the QPixmapCache::Key API will be very efficient
+ and convenient for a 1 object <-> 1 pixmap mapping (then you can store the key as
+ a member).
If two pixmaps are inserted into the cache using equal keys, then the
last pixmap will hide the first pixmap. The QHash and QCache classes do
exactly the same.