summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qfile.cpp8
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp4
2 files changed, 9 insertions, 3 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index fac4ac6..85e78a6 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -993,8 +993,14 @@ bool QFile::open(OpenMode mode)
return false;
}
+#ifdef Q_OS_SYMBIAN
+ // For symbian, the unbuffered flag is used to control write-behind cache behaviour
+ if (fileEngine()->open(mode))
+#else
// QIODevice provides the buffering, so there's no need to request it from the file engine.
- if (fileEngine()->open(mode | QIODevice::Unbuffered)) {
+ if (fileEngine()->open(mode | QIODevice::Unbuffered))
+#endif
+ {
QIODevice::open(mode);
if (mode & Append)
seek(size());
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 55388e6..1e1b35b 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -196,8 +196,8 @@ bool QFSFileEnginePrivate::nativeOpen(QIODevice::OpenMode openMode)
if (openMode & QFile::Unbuffered) {
if (openMode & QIODevice::WriteOnly)
symbianMode |= 0x00001000; //EFileWriteDirectIO;
- if (openMode & QIODevice::ReadOnly)
- symbianMode |= 0x00004000; //EFileReadDirectIO;
+ // ### Unbuffered read is not used, because it prevents file open in /resource
+ // ### and has no obvious benefits
} else {
if (openMode & QIODevice::WriteOnly)
symbianMode |= 0x00000800; //EFileWriteBuffered;