diff options
author | Liang Qi <liang.qi@qt.io> | 2016-06-13 09:01:02 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-06-13 12:46:46 +0200 |
commit | 511790fd1af1e2886a0e2e8dd4308099705cd815 (patch) | |
tree | b42aee537a6103cd064f9f41ae2889b09b79fd23 /src/gui/image/qimagepixmapcleanuphooks.cpp | |
parent | 1542d8881fc5ccbc5918cd4acbe4091ebbd24508 (diff) | |
parent | cbe332405aa22257d432f1797b325f5e57007c20 (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
config_help.txt
configure
mkspecs/features/uikit/sdk.prf
src/corelib/global/qhooks.cpp
src/corelib/io/qfilesystemwatcher.cpp
src/corelib/io/qlockfile_unix.cpp
src/corelib/tools/qalgorithms.h
src/gui/kernel/qwindowsysteminterface.h
src/gui/text/qtextdocument_p.cpp
src/network/access/access.pri
src/network/access/qnetworkaccessmanager.cpp
src/network/access/qnetworkreplynsurlconnectionimpl.mm
src/src.pro
src/testlib/qtestcase.cpp
src/widgets/kernel/qwidgetbackingstore_p.h
src/widgets/styles/qwindowscestyle.cpp
src/widgets/styles/qwindowsmobilestyle.cpp
tests/auto/corelib/io/qdiriterator/qdiriterator.pro
tests/auto/corelib/io/qfileinfo/qfileinfo.pro
tests/auto/gui/kernel/qwindow/BLACKLIST
tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
tools/configure/configureapp.cpp
Change-Id: Ibf7fb9c8cf263a810ade82f821345d0725c57c67
Diffstat (limited to 'src/gui/image/qimagepixmapcleanuphooks.cpp')
-rw-r--r-- | src/gui/image/qimagepixmapcleanuphooks.cpp | 18 |
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); } |