summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimagepixmapcleanuphooks.cpp
diff options
context:
space:
mode:
authorBill King <bking@trolltech.com>2010-02-16 05:52:44 (GMT)
committerBill King <bking@trolltech.com>2010-02-16 05:52:44 (GMT)
commit3598150df228148c49aa5212ee42bd56c3690032 (patch)
tree6d52a578a355e963b05b5a52a6205c270b0f9085 /src/gui/image/qimagepixmapcleanuphooks.cpp
parentdf27c6e5db83e41ace52e2cebca140a956e9e240 (diff)
parent7687b9dd937d8824ef8cbd69385ebe5b81b3885d (diff)
downloadQt-3598150df228148c49aa5212ee42bd56c3690032.zip
Qt-3598150df228148c49aa5212ee42bd56c3690032.tar.gz
Qt-3598150df228148c49aa5212ee42bd56c3690032.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-sql-team into 4.6
Diffstat (limited to 'src/gui/image/qimagepixmapcleanuphooks.cpp')
-rw-r--r--src/gui/image/qimagepixmapcleanuphooks.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/gui/image/qimagepixmapcleanuphooks.cpp b/src/gui/image/qimagepixmapcleanuphooks.cpp
index ace4bb6..517fcb0 100644
--- a/src/gui/image/qimagepixmapcleanuphooks.cpp
+++ b/src/gui/image/qimagepixmapcleanuphooks.cpp
@@ -122,19 +122,32 @@ void QImagePixmapCleanupHooks::executeImageHooks(qint64 key)
qt_image_cleanup_hook_64(key);
}
-void QImagePixmapCleanupHooks::enableCleanupHooks(const QPixmap &pixmap)
-{
- enableCleanupHooks(const_cast<QPixmap &>(pixmap).data_ptr().data());
-}
void QImagePixmapCleanupHooks::enableCleanupHooks(QPixmapData *pixmapData)
{
pixmapData->is_cached = true;
}
+void QImagePixmapCleanupHooks::enableCleanupHooks(const QPixmap &pixmap)
+{
+ enableCleanupHooks(const_cast<QPixmap &>(pixmap).data_ptr().data());
+}
+
void QImagePixmapCleanupHooks::enableCleanupHooks(const QImage &image)
{
const_cast<QImage &>(image).data_ptr()->is_cached = true;
}
+bool QImagePixmapCleanupHooks::isImageCached(const QImage &image)
+{
+ return const_cast<QImage &>(image).data_ptr()->is_cached;
+}
+
+bool QImagePixmapCleanupHooks::isPixmapCached(const QPixmap &pixmap)
+{
+ return const_cast<QPixmap&>(pixmap).data_ptr().data()->is_cached;
+}
+
+
+
QT_END_NAMESPACE