diff options
author | David Boddie <dboddie@trolltech.com> | 2010-02-10 15:51:48 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-02-10 15:51:48 (GMT) |
commit | c072fa8fdd0cebcaff9062e07d4623bbd7aded3c (patch) | |
tree | db35223ec643fbc5aeadcfab4112e5686ff44b8f /src/gui/image/qpixmap.cpp | |
parent | bf54d63fb1b60ad899d0b14889109278bd04fd9d (diff) | |
parent | 9a83bf2676dabdf36f9ca491b480b50d8e7ed93d (diff) | |
download | Qt-c072fa8fdd0cebcaff9062e07d4623bbd7aded3c.zip Qt-c072fa8fdd0cebcaff9062e07d4623bbd7aded3c.tar.gz Qt-c072fa8fdd0cebcaff9062e07d4623bbd7aded3c.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1
Diffstat (limited to 'src/gui/image/qpixmap.cpp')
-rw-r--r-- | src/gui/image/qpixmap.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index e51d858..7cafbd0 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -320,8 +320,6 @@ QPixmap::QPixmap(const char * const xpm[]) QPixmap::~QPixmap() { Q_ASSERT(!data || data->ref >= 1); // Catch if ref-counting changes again - if (data && data->is_cached && data->ref == 1) // ref will be decrememnted after destructor returns - QImagePixmapCleanupHooks::executePixmapDestructionHooks(this); } /*! @@ -1025,12 +1023,8 @@ qint64 QPixmap::cacheKey() const if (isNull()) return 0; - int classKey = data->classId(); - if (classKey >= 1024) - classKey = -(classKey >> 10); - return ((((qint64) classKey) << 56) - | (((qint64) data->serialNumber()) << 32) - | ((qint64) (data->detach_no))); + Q_ASSERT(data); + return data->cacheKey(); } static void sendResizeEvents(QWidget *target) @@ -1963,7 +1957,7 @@ void QPixmap::detach() } if (data->is_cached && data->ref == 1) - QImagePixmapCleanupHooks::executePixmapModificationHooks(this); + QImagePixmapCleanupHooks::executePixmapDataModificationHooks(data.data()); #if defined(Q_WS_MAC) QMacPixmapData *macData = id == QPixmapData::MacClass ? static_cast<QMacPixmapData*>(data.data()) : 0; |