QPixmapCache: remove unused Q_TEST_QPIXMAPCACHE-only function
Unused by tst_qpixmapcache.cpp and everything else, and uses an inefficient QList, so remove. Change-Id: Ia410ed19db9bb3db97460b21bc2fd9d53c95a73d Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>bb10
parent
bc977f690f
commit
e2d83802a0
|
|
@ -179,7 +179,6 @@ public:
|
|||
|
||||
static QPixmapCache::KeyData* getKeyData(QPixmapCache::Key *key);
|
||||
|
||||
QList< QPair<QString,QPixmap> > allPixmaps() const;
|
||||
bool flushDetachedPixmaps(bool nt);
|
||||
|
||||
private:
|
||||
|
|
@ -423,20 +422,6 @@ QPixmapCache::KeyData* QPMCache::getKeyData(QPixmapCache::Key *key)
|
|||
return key->d;
|
||||
}
|
||||
|
||||
QList< QPair<QString,QPixmap> > QPMCache::allPixmaps() const
|
||||
{
|
||||
QList< QPair<QString,QPixmap> > r;
|
||||
QHash<QString, QPixmapCache::Key>::const_iterator it = cacheKeys.begin();
|
||||
while (it != cacheKeys.end()) {
|
||||
QPixmap *ptr = QCache<QPixmapCache::Key, QPixmapCacheEntry>::object(it.value());
|
||||
if (ptr)
|
||||
r.append(QPair<QString,QPixmap>(it.key(),*ptr));
|
||||
++it;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
Q_GLOBAL_STATIC(QPMCache, pm_cache)
|
||||
|
||||
int Q_AUTOTEST_EXPORT q_QPixmapCache_keyHashSize()
|
||||
|
|
@ -656,9 +641,4 @@ int QPixmapCache::totalUsed()
|
|||
return (pm_cache()->totalCost()+1023) / 1024;
|
||||
}
|
||||
|
||||
QList< QPair<QString,QPixmap> > QPixmapCache::allPixmaps()
|
||||
{
|
||||
return pm_cache()->allPixmaps();
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -36,10 +36,6 @@
|
|||
|
||||
#include <QtGui/qpixmap.h>
|
||||
|
||||
#ifdef Q_TEST_QPIXMAPCACHE
|
||||
#include <QtCore/qpair.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
|
|
@ -80,7 +76,6 @@ public:
|
|||
#ifdef Q_TEST_QPIXMAPCACHE
|
||||
static void flushDetachedPixmaps();
|
||||
static int totalUsed();
|
||||
static QList< QPair<QString,QPixmap> > allPixmaps();
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue