From 3c7db705baccdb326e69c00effdae4631ff09ce4 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Sun, 22 Jul 2018 17:12:55 +0200 Subject: Use QScopeGuard instead of library local helper template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia96accbd0522554aef65839eb12062f4facd2604 Reviewed-by: Sérgio Martins --- src/qml/compiler/qv4compilationunitmapper_win.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/compiler/qv4compilationunitmapper_win.cpp') diff --git a/src/qml/compiler/qv4compilationunitmapper_win.cpp b/src/qml/compiler/qv4compilationunitmapper_win.cpp index 3e44d045fc..779c1288fe 100644 --- a/src/qml/compiler/qv4compilationunitmapper_win.cpp +++ b/src/qml/compiler/qv4compilationunitmapper_win.cpp @@ -40,7 +40,7 @@ #include "qv4compilationunitmapper_p.h" #include "qv4compileddata_p.h" -#include +#include #include #include #include @@ -71,7 +71,7 @@ CompiledData::Unit *CompilationUnitMapper::open(const QString &cacheFileName, co return nullptr; } - QDeferredCleanup fileHandleCleanup([handle]{ + auto fileHandleCleanup = qScopeGuard([handle]{ CloseHandle(handle); }); @@ -98,7 +98,7 @@ CompiledData::Unit *CompilationUnitMapper::open(const QString &cacheFileName, co return nullptr; } - QDeferredCleanup mappingCleanup([fileMappingHandle]{ + auto mappingCleanup = qScopeGuard([fileMappingHandle]{ CloseHandle(fileMappingHandle); }); -- cgit v1.2.3