summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfsfileengine.cpp
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-10-07 15:42:39 (GMT)
committerJoão Abecasis <joao@abecasis.name>2009-10-21 11:46:06 (GMT)
commit512c2284cafb3eb23d06fc5cdc4e424b711a04b7 (patch)
tree01ca4c0a62e14d1e7e28d89ec7fcc7aa7f4a0610 /src/corelib/io/qfsfileengine.cpp
parent0689a85ca20a36808b388efc452892606d47b34d (diff)
downloadQt-512c2284cafb3eb23d06fc5cdc4e424b711a04b7.zip
Qt-512c2284cafb3eb23d06fc5cdc4e424b711a04b7.tar.gz
Qt-512c2284cafb3eb23d06fc5cdc4e424b711a04b7.tar.bz2
(Windows) Don't create a file mapping for each view that is mapped
Creating a file mapping for each view mapped to memory is sub-optimal and slow. With this change, a single mapping is created and reused when mapping subsequent views of the file. The handle returned from CreateFileForMapping (used in WinCE 5) is now discarded, since the kernel manages it automatically with the file mapping. This simplifies use of the deprecated map API. Reviewed-by: Maurice Kalinowski Reviewed-by: Marius Storm-Olsen
Diffstat (limited to 'src/corelib/io/qfsfileengine.cpp')
-rw-r--r--src/corelib/io/qfsfileengine.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp
index fb096a7..2c5451d 100644
--- a/src/corelib/io/qfsfileengine.cpp
+++ b/src/corelib/io/qfsfileengine.cpp
@@ -122,11 +122,9 @@ void QFSFileEnginePrivate::init()
#ifdef Q_OS_WIN
fileAttrib = INVALID_FILE_ATTRIBUTES;
fileHandle = INVALID_HANDLE_VALUE;
+ mapHandle = INVALID_HANDLE_VALUE;
cachedFd = -1;
#endif
-#ifdef Q_USE_DEPRECATED_MAP_API
- fileMapHandle = INVALID_HANDLE_VALUE;
-#endif
}
/*!