aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compilationunitmapper_unix.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-07-22 17:12:55 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-07-22 20:10:28 +0000
commit3c7db705baccdb326e69c00effdae4631ff09ce4 (patch)
treedc76af685717107b8ebd200015abf7e948df9083 /src/qml/compiler/qv4compilationunitmapper_unix.cpp
parenta605cdc3ff84de3a4107f19bc90a5251f6801f6c (diff)
Use QScopeGuard instead of library local helper template
Change-Id: Ia96accbd0522554aef65839eb12062f4facd2604 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Diffstat (limited to 'src/qml/compiler/qv4compilationunitmapper_unix.cpp')
-rw-r--r--src/qml/compiler/qv4compilationunitmapper_unix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4compilationunitmapper_unix.cpp b/src/qml/compiler/qv4compilationunitmapper_unix.cpp
index 1fef4d38f4..6768bc9596 100644
--- a/src/qml/compiler/qv4compilationunitmapper_unix.cpp
+++ b/src/qml/compiler/qv4compilationunitmapper_unix.cpp
@@ -42,7 +42,7 @@
#include <sys/mman.h>
#include <functional>
#include <private/qcore_unix_p.h>
-#include <private/qdeferredcleanup_p.h>
+#include <QScopeGuard>
#include <QDateTime>
#include "qv4compileddata_p.h"
@@ -61,7 +61,7 @@ CompiledData::Unit *CompilationUnitMapper::open(const QString &cacheFileName, co
return nullptr;
}
- QDeferredCleanup cleanup([fd]{
+ auto cleanup = qScopeGuard([fd]{
qt_safe_close(fd) ;
});