From dba9af0dccff6de193a9321b62ec01e995357d86 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Wed, 22 Jun 2016 21:39:57 +0000 Subject: [PATCH] inline obsolete QPixmapCache::find() overload this is just temporary, or at least I think so (until I figure out how much is it used externally). internally it is used a lot but that can be changed Signed-off-by: Ivailo Monev --- src/gui/image/qpixmapcache.cpp | 6 +----- src/gui/image/qpixmapcache.h | 4 +++- src/gui/image/qpixmapcache_p.h | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp index ee5f68529..37f3097ae 100644 --- a/src/gui/image/qpixmapcache.cpp +++ b/src/gui/image/qpixmapcache.cpp @@ -487,15 +487,11 @@ QPixmap *QPixmapCache::find(const QString &key) /*! \obsolete + \fn QPixmapCache::find(const QString &key, QPixmap& pixmap) Use bool find(const QString&, QPixmap*) instead. */ -bool QPixmapCache::find(const QString &key, QPixmap& pixmap) -{ - return find(key, &pixmap); -} - /*! Looks for a cached pixmap associated with the given \a key in the cache. If the pixmap is found, the function sets \a pixmap to that pixmap and diff --git a/src/gui/image/qpixmapcache.h b/src/gui/image/qpixmapcache.h index 2fd25cbca..5a6295900 100644 --- a/src/gui/image/qpixmapcache.h +++ b/src/gui/image/qpixmapcache.h @@ -77,7 +77,9 @@ public: static int cacheLimit(); static void setCacheLimit(int); static QPixmap *find(const QString &key); - static bool find(const QString &key, QPixmap &pixmap); + // ### get rid of this function + static inline bool find(const QString &key, QPixmap &pixmap) + { return find(key, &pixmap); }; static bool find(const QString &key, QPixmap *pixmap); static bool find(const Key &key, QPixmap *pixmap); static bool insert(const QString &key, const QPixmap &pixmap); diff --git a/src/gui/image/qpixmapcache_p.h b/src/gui/image/qpixmapcache_p.h index 2df0349ae..20aa266a9 100644 --- a/src/gui/image/qpixmapcache_p.h +++ b/src/gui/image/qpixmapcache_p.h @@ -96,8 +96,6 @@ public: QPixmapCache::Key key; }; -inline bool qIsDetached(QPixmapCacheEntry &t) { return t.isDetached(); } - QT_END_NAMESPACE #endif // QPIXMAPCACHE_P_H -- 2.11.0