diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-12-01 16:38:59 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-12-20 11:52:34 (GMT) |
commit | b98e374e94e81b66be0dc009356a729e9b97dce8 (patch) | |
tree | cacfd6737f8a0434d02f6a81e7e9ebe6e692fc99 /src/corelib/io/qfilesystemwatcher.cpp | |
parent | 64e1f888586f2c988b08bcc93579990e970b7206 (diff) | |
download | Qt-b98e374e94e81b66be0dc009356a729e9b97dce8.zip Qt-b98e374e94e81b66be0dc009356a729e9b97dce8.tar.gz Qt-b98e374e94e81b66be0dc009356a729e9b97dce8.tar.bz2 |
QFile API: add API to specify if adopted file handles should be closed
QFile behaviour has been to not close file handles adopted by
open(FILE*, OpenMode) and open(int fd, OpenMode) functions. This is
inconvenient for frameworks which want to return an opened QFile to
the user. In this case it would be better to transfer ownership of the
handle to the QFile.
New overloads are added which take an additional parameter from the
QFile::FileHandleFlags flags. Currently only one bit is used to provide the
AutoCloseHandle option, but it is extensible.
The AutoCloseHandle option tells the QFile backend that it should
close the handle when close() is called, rather than the default
behaviour which remains to flush the handle and leave it open.
The DontCloseHandle option is the inverse of this, specifying the old
behaviour of flushing but not closing the file handle.
Symbian OS file handles are not compatible with int, they are an opaque
data type which contains two integers.
The first identifies to the kernel the file server session
The second identifies to the file server the subsession object (the file)
The reason for this is that it has a microkernel architecture, the
kernel has no support for files - all files and file systems are handled
by a user mode process called the "file server".
So for symbian, a new QFile::open() overload is added for adopting a
symbian RFile handle.
The API mirrors the existing API for POSIX file handles, but takes an
RFile reference rather than an integer file descriptor.
Task-number: QT-2924
Reviewed-by: joao
Reviewed-by: mread
Reviewed-by: Oswald Buddenhagen
Diffstat (limited to 'src/corelib/io/qfilesystemwatcher.cpp')
0 files changed, 0 insertions, 0 deletions