diff options
Diffstat (limited to 'tests/auto/qpixmapcache/tst_qpixmapcache.cpp')
-rw-r--r-- | tests/auto/qpixmapcache/tst_qpixmapcache.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qpixmapcache/tst_qpixmapcache.cpp b/tests/auto/qpixmapcache/tst_qpixmapcache.cpp index 405ac34..fb5998a 100644 --- a/tests/auto/qpixmapcache/tst_qpixmapcache.cpp +++ b/tests/auto/qpixmapcache/tst_qpixmapcache.cpp @@ -369,6 +369,14 @@ void tst_QPixmapCache::remove() key = QPixmapCache::insert(p1); QCOMPARE(getPrivate(key)->key, 1); + //Test if pixmaps are correctly deleted + QPixmapCache::clear(); + key = QPixmapCache::insert(p1); + QCOMPARE(getPrivate(key)->key, 1); + QVERIFY(QPixmapCache::find(key, &p1) != 0); + QPixmapCache::remove(key); + QCOMPARE(p1.isDetached(), true); + //We mix both part of the API QPixmapCache::clear(); p1.fill(Qt::red); |