From b6cf9e28c2fef9112789e98ac9d1eda45a407889 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 4 Dec 2009 14:36:48 +0100 Subject: Fix compilation with Sun CC 5.9: it was crashing with this code. Definitely a compiler bug. Reviewed-by: Kent Hansen --- src/gui/image/qimagepixmapcleanuphooks.cpp | 9 +++++---- 1 file 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) -- cgit v0.12