diff options
Diffstat (limited to 'src/quick/util/qdeclarativepixmapcache.cpp')
-rw-r--r-- | src/quick/util/qdeclarativepixmapcache.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/quick/util/qdeclarativepixmapcache.cpp b/src/quick/util/qdeclarativepixmapcache.cpp index 43ce3346cb..95cbd361b8 100644 --- a/src/quick/util/qdeclarativepixmapcache.cpp +++ b/src/quick/util/qdeclarativepixmapcache.cpp @@ -695,6 +695,8 @@ public: void unreferencePixmap(QDeclarativePixmapData *); void referencePixmap(QDeclarativePixmapData *); + void purgeCache(); + protected: virtual void timerEvent(QTimerEvent *); @@ -827,6 +829,16 @@ void QDeclarativePixmapStore::timerEvent(QTimerEvent *) } } +void QDeclarativePixmapStore::purgeCache() +{ + shrinkCache(m_unreferencedCost); +} + +void QDeclarativePixmap::purgeCache() +{ + pixmapStore()->purgeCache(); +} + QDeclarativePixmapReply::QDeclarativePixmapReply(QDeclarativePixmapData *d) : data(d), engineForReader(0), requestSize(d->requestSize), url(d->url), loading(false), redirectCount(0) { |