summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmapcache.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-04-04 11:40:36 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-06-21 11:58:03 +0000
commit7fa3267fda6cff720cca44e829f9a39789031a54 (patch)
tree4ad23ed71ed738f6b6197ebbdce5628efcfcd342 /src/gui/image/qpixmapcache.h
parent91efd6116665bd71f7932adcf7a589204c239276 (diff)
QPixmapCache: Move qHash(Key) from _p.h to public header
... and make it a hidden friend. This avoids ODR violations when, because they can't use ours (private, and not exported), users try to produce their own version of qHash(Key). [ChangeLog][QtGui][QPixmapCache] Made the qHash() overload for QPixmapCache::Key public (was: private) API. Pick-to: 6.6 Change-Id: I324ed001c0ae0a251ac2e1d04713013452ffff9c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/gui/image/qpixmapcache.h')
-rw-r--r--src/gui/image/qpixmapcache.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/image/qpixmapcache.h b/src/gui/image/qpixmapcache.h
index 55aad6503f..72ee1b797f 100644
--- a/src/gui/image/qpixmapcache.h
+++ b/src/gui/image/qpixmapcache.h
@@ -31,6 +31,10 @@ public:
bool isValid() const noexcept;
private:
+ friend size_t qHash(const QPixmapCache::Key &k, size_t seed = 0) noexcept
+ { return k.hash(seed); }
+ size_t hash(size_t seed) const noexcept;
+
KeyData *d;
friend class QPMCache;
friend class QPixmapCache;