summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfile.cpp
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2010-10-22 15:00:24 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2010-10-29 13:22:09 (GMT)
commit484770255f421d71954df4511e3541d2d4654d4e (patch)
tree517604946f4d891a5e519e7530525cca8da46bc4 /src/corelib/io/qfile.cpp
parentae9b1a4a392953097d05d55549cc1583f94c3bc8 (diff)
downloadQt-484770255f421d71954df4511e3541d2d4654d4e.zip
Qt-484770255f421d71954df4511e3541d2d4654d4e.tar.gz
Qt-484770255f421d71954df4511e3541d2d4654d4e.tar.bz2
Re-enable emulated QFile::map on symbian
Memory mapping of RFile handles is not supported in current symbian OS versions. However the "open C" libraries provide an emulated mmap() implementation which was used by QFile::map in Qt 4.6 release. To avoid breaking applications which rely on this function, QFile::map will now open the file with open C as well in order to use that handle to call mmap(). When symbian implements a file mapping API, we can switch the implementation to use that for RFile handles. Reviewed-By: joao
Diffstat (limited to 'src/corelib/io/qfile.cpp')
-rw-r--r--src/corelib/io/qfile.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index a0bc68e..f0ca11b 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -48,6 +48,7 @@
#include "qfileinfo.h"
#include "private/qiodevice_p.h"
#include "private/qfile_p.h"
+#include "private/qsystemerror_p.h"
#if defined(QT_BUILD_CORE_LIB)
# include "qcoreapplication.h"
#endif
@@ -1223,6 +1224,7 @@ bool QFile::unmap(uchar *address)
d->setError(d->fileEngine->error(), d->fileEngine->errorString());
return success;
}
+ d->setError(PermissionsError, QSystemError(EACCES, QSystemError::StandardLibraryError).toString());
return false;
}