diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2010-02-10 15:50:55 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2010-02-10 15:50:55 (GMT) |
commit | 1b0c7a43624f378619ba4b5cc33fa3bfe4f531ed (patch) | |
tree | c22f6a63c2911d52ecc11aec8662d2f682d6afda /src/gui/image/qpixmap.cpp | |
parent | 492f1f4267074525e33fb8571c12d520e92163a6 (diff) | |
parent | b7af368e86874d71ffc9071c9ef009814d6a3467 (diff) | |
download | Qt-1b0c7a43624f378619ba4b5cc33fa3bfe4f531ed.zip Qt-1b0c7a43624f378619ba4b5cc33fa3bfe4f531ed.tar.gz Qt-1b0c7a43624f378619ba4b5cc33fa3bfe4f531ed.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2
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; |