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 <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2016-06-22 21:39:57 +00:00
parent f8364bdd24
commit dba9af0dcc
3 changed files with 4 additions and 8 deletions

View file

@ -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

View file

@ -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);

View file

@ -96,8 +96,6 @@ public:
QPixmapCache::Key key;
};
inline bool qIsDetached(QPixmapCacheEntry &t) { return t.isDetached(); }
QT_END_NAMESPACE
#endif // QPIXMAPCACHE_P_H