diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-12-04 13:36:48 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-12-04 13:39:59 (GMT) |
commit | b6cf9e28c2fef9112789e98ac9d1eda45a407889 (patch) | |
tree | ea58045d556365eebb7561bdf181df272f3aa702 /src/gui | |
parent | c9d0b0bb9d2e3745f6e2a562ac02526f78ca8ff6 (diff) | |
download | Qt-b6cf9e28c2fef9112789e98ac9d1eda45a407889.zip Qt-b6cf9e28c2fef9112789e98ac9d1eda45a407889.tar.gz Qt-b6cf9e28c2fef9112789e98ac9d1eda45a407889.tar.bz2 |
Fix compilation with Sun CC 5.9: it was crashing with this code.
Definitely a compiler bug.
Reviewed-by: Kent Hansen
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qimagepixmapcleanuphooks.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/image/qimagepixmapcleanuphooks.cpp b/src/gui/image/qimagepixmapcleanuphooks.cpp index 650075b..e411cd1 100644 --- a/src/gui/image/qimagepixmapcleanuphooks.cpp +++ b/src/gui/image/qimagepixmapcleanuphooks.cpp @@ -93,11 +93,11 @@ void QImagePixmapCleanupHooks::removeImageHook(_qt_image_cleanup_hook_64 hook) imageHooks.removeAll(hook); } - void QImagePixmapCleanupHooks::executePixmapModificationHooks(QPixmap* pm) { - for (int i = 0; i < qt_image_and_pixmap_cleanup_hooks()->pixmapModificationHooks.count(); ++i) - qt_image_and_pixmap_cleanup_hooks()->pixmapModificationHooks[i](pm); + QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks(); + for (int i = 0; i < h->pixmapModificationHooks.count(); ++i) + h->pixmapModificationHooks[i](pm); if (qt_pixmap_cleanup_hook_64) qt_pixmap_cleanup_hook_64(pm->cacheKey()); @@ -105,7 +105,8 @@ void QImagePixmapCleanupHooks::executePixmapModificationHooks(QPixmap* pm) void QImagePixmapCleanupHooks::executePixmapDestructionHooks(QPixmap* pm) { - for (int i = 0; i < qt_image_and_pixmap_cleanup_hooks()->pixmapDestructionHooks.count(); ++i) + QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks(); + for (int i = 0; i < h->pixmapModificationHooks.count(); ++i) qt_image_and_pixmap_cleanup_hooks()->pixmapDestructionHooks[i](pm); if (qt_pixmap_cleanup_hook_64) |