diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2011-06-21 15:27:20 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2011-06-28 12:12:41 (GMT) |
commit | efde1f9521962398c156efd0b6670a358537ba51 (patch) | |
tree | 1212215199659f594cdf36e152b88c227f6b51b2 /src/corelib/io/qfsfileengine.cpp | |
parent | 3b4a7777829a75d1587efbcaf297566d7c710d80 (diff) | |
download | Qt-efde1f9521962398c156efd0b6670a358537ba51.zip Qt-efde1f9521962398c156efd0b6670a358537ba51.tar.gz Qt-efde1f9521962398c156efd0b6670a358537ba51.tar.bz2 |
Native memory mapped file support
Task-number: QT-5026
Reviewed-by: mread
Diffstat (limited to 'src/corelib/io/qfsfileengine.cpp')
-rw-r--r-- | src/corelib/io/qfsfileengine.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index 0d23a27..548f9cf 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -120,7 +120,7 @@ void QFSFileEnginePrivate::init() openMode = QIODevice::NotOpen; fd = -1; fh = 0; -#ifdef Q_OS_SYMBIAN +#if defined (Q_OS_SYMBIAN) && !defined(QT_SYMBIAN_USE_NATIVE_FILEMAP) fileHandleForMaps = -1; #endif lastIOCommand = IOFlushCommand; @@ -368,8 +368,10 @@ bool QFSFileEnginePrivate::closeFdFh() if (fd == -1 && !fh #ifdef Q_OS_SYMBIAN && !symbianFile.SubSessionHandle() +#ifndef QT_SYMBIAN_USE_NATIVE_FILEMAP && fileHandleForMaps == -1 #endif +#endif ) return false; @@ -378,7 +380,7 @@ bool QFSFileEnginePrivate::closeFdFh() bool closed = true; tried_stat = 0; -#ifdef Q_OS_SYMBIAN +#if defined(Q_OS_SYMBIAN) && !defined(QT_SYMBIAN_USE_NATIVE_FILEMAP) // Map handle is always owned by us so always close it if (fileHandleForMaps >= 0) { QT_CLOSE(fileHandleForMaps); |