diff options
author | Simon Hausmann <[email protected]> | 2016-08-15 11:24:17 +0200 |
---|---|---|
committer | Simon Hausmann <[email protected]> | 2016-08-17 14:05:21 +0000 |
commit | 7101ca92fe9449d4da1b45cf57b9fa62e527b500 (patch) | |
tree | b2c1a4bf9c33011a26fb91a91fba3d55c2aee91b /src/qml/compiler/qv4compilationunitmapper_win.cpp | |
parent | 9fcca80bc4682fd274d2e4d8014390962dab5daa (diff) |
Enable QML disk cache on WinRT 10
Change-Id: I6a61d015c93bf507c0b68f3a975d8574334a05e5
Reviewed-by: Maurice Kalinowski <[email protected]>
Diffstat (limited to 'src/qml/compiler/qv4compilationunitmapper_win.cpp')
-rw-r--r-- | src/qml/compiler/qv4compilationunitmapper_win.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/compiler/qv4compilationunitmapper_win.cpp b/src/qml/compiler/qv4compilationunitmapper_win.cpp index 6c2f36e7a0..4361752f93 100644 --- a/src/qml/compiler/qv4compilationunitmapper_win.cpp +++ b/src/qml/compiler/qv4compilationunitmapper_win.cpp @@ -75,10 +75,7 @@ CompiledData::Unit *CompilationUnitMapper::open(const QString &cacheFileName, co CloseHandle(handle); }); -#if defined(Q_OS_WINRT) - *errorString = QStringLiteral("Compilation unit mapping not supported on WinRT yet"); - return nullptr; -#else +#if !defined(Q_OS_WINRT) || _MSC_VER >= 1900 CompiledData::Unit header; DWORD bytesRead; if (!ReadFile(handle, reinterpret_cast<char *>(&header), sizeof(header), &bytesRead, nullptr)) { @@ -118,12 +115,15 @@ CompiledData::Unit *CompilationUnitMapper::open(const QString &cacheFileName, co } return reinterpret_cast<CompiledData::Unit*>(dataPtr); +#else + *errorString = QStringLiteral("Compilation unit mapping not supported on WinRT 8.1"); + return nullptr; #endif } void CompilationUnitMapper::close() { -#if !defined(Q_OS_WINRT) +#if !defined(Q_OS_WINRT) || _MSC_VER >= 1900 if (dataPtr != nullptr) UnmapViewOfFile(dataPtr); #endif |