summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimage.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-07-30 08:15:46 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-07-30 08:15:46 (GMT)
commitd2820e3a67812d31f45df282b378a75511bb1c4b (patch)
tree8ab0213d5250289b30d7e26e50ab85fe3c5c4068 /src/gui/image/qimage.cpp
parent9523b27be4fe00870d19c4ff4caa2d78dcf520e6 (diff)
parent0ff4c453bf3d549e8344ab18f643f61a8b6174ef (diff)
downloadQt-d2820e3a67812d31f45df282b378a75511bb1c4b.zip
Qt-d2820e3a67812d31f45df282b378a75511bb1c4b.tar.gz
Qt-d2820e3a67812d31f45df282b378a75511bb1c4b.tar.bz2
Merge branch 'texture_from_pixmap'
Diffstat (limited to 'src/gui/image/qimage.cpp')
-rw-r--r--src/gui/image/qimage.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index e8ca7a9..bb77fb5 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -49,6 +49,7 @@
#include "qimagewriter.h"
#include "qstringlist.h"
#include "qvariant.h"
+#include "qimagepixmapcleanuphooks_p.h"
#include <ctype.h>
#include <stdlib.h>
#include <limits.h>
@@ -106,14 +107,6 @@ static inline bool checkPixelSize(const QImage::Format format)
}
-// ### Qt 5: remove
-typedef void (*_qt_image_cleanup_hook)(int);
-Q_GUI_EXPORT _qt_image_cleanup_hook qt_image_cleanup_hook = 0;
-
-// ### Qt 5: rename
-typedef void (*_qt_image_cleanup_hook_64)(qint64);
-Q_GUI_EXPORT _qt_image_cleanup_hook_64 qt_image_cleanup_hook_64 = 0;
-
static QImage rotated90(const QImage &src);
static QImage rotated180(const QImage &src);
static QImage rotated270(const QImage &src);
@@ -257,8 +250,8 @@ QImageData * QImageData::create(const QSize &size, QImage::Format format, int nu
QImageData::~QImageData()
{
- if (is_cached && qt_image_cleanup_hook_64)
- qt_image_cleanup_hook_64((((qint64) ser_no) << 32) | ((qint64) detach_no));
+ if (is_cached)
+ QImagePixmapCleanupHooks::executeImageHooks((((qint64) ser_no) << 32) | ((qint64) detach_no));
delete paintEngine;
if (data && own_data)
free(data);
@@ -1342,8 +1335,8 @@ QImage::operator QVariant() const
void QImage::detach()
{
if (d) {
- if (d->is_cached && qt_image_cleanup_hook_64 && d->ref == 1)
- qt_image_cleanup_hook_64(cacheKey());
+ if (d->is_cached && d->ref == 1)
+ QImagePixmapCleanupHooks::executeImageHooks(cacheKey());
if (d->ref != 1 || d->ro_data)
*this = copy();