summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimagepixmapcleanuphooks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qimagepixmapcleanuphooks.cpp')
-rw-r--r--src/gui/image/qimagepixmapcleanuphooks.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/image/qimagepixmapcleanuphooks.cpp b/src/gui/image/qimagepixmapcleanuphooks.cpp
index 10fa4303b2..f383e7a60e 100644
--- a/src/gui/image/qimagepixmapcleanuphooks.cpp
+++ b/src/gui/image/qimagepixmapcleanuphooks.cpp
@@ -84,38 +84,38 @@ void QImagePixmapCleanupHooks::removeImageHook(_qt_image_cleanup_hook_64 hook)
void QImagePixmapCleanupHooks::executePlatformPixmapModificationHooks(QPlatformPixmap* pmd)
{
- QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks();
+ const QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks();
// the global destructor for the pixmap and image hooks might have
// been called already if the app is "leaking" global
// pixmaps/images
if (!h)
return;
- for (int i = 0; i < h->pixmapModificationHooks.count(); ++i)
- h->pixmapModificationHooks[i](pmd);
+ for (auto hook : h->pixmapModificationHooks)
+ hook(pmd);
}
void QImagePixmapCleanupHooks::executePlatformPixmapDestructionHooks(QPlatformPixmap* pmd)
{
- QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks();
+ const QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks();
// the global destructor for the pixmap and image hooks might have
// been called already if the app is "leaking" global
// pixmaps/images
if (!h)
return;
- for (int i = 0; i < h->pixmapDestructionHooks.count(); ++i)
- h->pixmapDestructionHooks[i](pmd);
+ for (auto hook : h->pixmapDestructionHooks)
+ hook(pmd);
}
void QImagePixmapCleanupHooks::executeImageHooks(qint64 key)
{
- QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks();
+ const QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks();
// the global destructor for the pixmap and image hooks might have
// been called already if the app is "leaking" global
// pixmaps/images
if (!h)
return;
- for (int i = 0; i < h->imageHooks.count(); ++i)
- h->imageHooks[i](key);
+ for (auto hook : h->imageHooks)
+ hook(key);
}