From c2bad7dba5eccd5450eaf7eddaebc75b8410fa95 Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Thu, 4 Jun 2009 12:36:16 +0200 Subject: Add an extra explanation for the API extension. Reviewed-by:David Boddie --- src/gui/image/qpixmapcache.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. -- cgit v0.12