diff options
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfile.cpp | 10 | ||||
-rw-r--r-- | src/corelib/io/qfsfileengine.cpp | 16 | ||||
-rw-r--r-- | src/corelib/io/qfsfileengine_unix.cpp | 8 | ||||
-rw-r--r-- | src/corelib/io/qnoncontiguousbytedevice.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qurl.cpp | 5 |
5 files changed, 33 insertions, 8 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 929b2f9..06c403a 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -366,9 +366,11 @@ QFilePrivate::setError(QFile::FileError err, int errNum) \value AutoCloseHandle The file handle passed into open() should be closed by close(), the default behaviour is that close just flushes - the file and the app is responsible for closing the file handle. When - opening a file by name, this flag is ignored as Qt always "owns" the + the file and the application is responsible for closing the file handle. + When opening a file by name, this flag is ignored as Qt always "owns" the file handle and must close it. + \value DontCloseHandle The file handle passed into open() will not be + closed by Qt. The application must ensure that close() is called. */ #ifdef QT3_SUPPORT @@ -1210,7 +1212,7 @@ bool QFile::open(int fd, OpenMode mode) Returns true if successful; otherwise returns false. When a QFile is opened using this function, behaviour of close() is - controlled by the AutoCloseHandle flag. + controlled by the \a handleFlags argument. If AutoCloseHandle is specified, and this function succeeds, then calling close() closes the adopted handle. Otherwise, close() does not actually close the file, but only flushes it. @@ -1269,7 +1271,7 @@ bool QFile::open(int fd, OpenMode mode, FileHandleFlags handleFlags) Returns true if successful; otherwise returns false. When a QFile is opened using this function, behaviour of close() is - controlled by the AutoCloseHandle flag. + controlled by the \a handleFlags argument. If AutoCloseHandle is specified, and this function succeeds, then calling close() closes the adopted handle. Otherwise, close() does not actually close the file, but only flushes it. diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index 548f9cf..e1f3123 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -233,6 +233,14 @@ bool QFSFileEngine::open(QIODevice::OpenMode openMode, FILE *fh) return open(openMode, fh, QFile::DontCloseHandle); } +/*! + Opens the file handle \a fh in \a openMode mode. Returns true + on success; otherwise returns false. + + The \a handleFlags argument specifies whether the file handle will be + closed by Qt. See the QFile::FileHandleFlags documentation for more + information. +*/ bool QFSFileEngine::open(QIODevice::OpenMode openMode, FILE *fh, QFile::FileHandleFlags handleFlags) { Q_D(QFSFileEngine); @@ -294,6 +302,14 @@ bool QFSFileEngine::open(QIODevice::OpenMode openMode, int fd) return open(openMode, fd, QFile::DontCloseHandle); } +/*! + Opens the file descriptor \a fd in \a openMode mode. Returns true + on success; otherwise returns false. + + The \a handleFlags argument specifies whether the file handle will be + closed by Qt. See the QFile::FileHandleFlags documentation for more + information. +*/ bool QFSFileEngine::open(QIODevice::OpenMode openMode, int fd, QFile::FileHandleFlags handleFlags) { Q_D(QFSFileEngine); diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 9de282a..4961722 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -252,6 +252,14 @@ bool QFSFileEnginePrivate::nativeOpen(QIODevice::OpenMode openMode) return true; } +/*! + Opens the file descriptor specified by \a file in the mode given by + \a openMode. Returns true on success; otherwise returns false. + + The \a handleFlags argument specifies whether the file handle will be + closed by Qt. See the QFile::FileHandleFlags documentation for more + information. +*/ bool QFSFileEngine::open(QIODevice::OpenMode openMode, const RFile &file, QFile::FileHandleFlags handleFlags) { Q_D(QFSFileEngine); diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp index 5568920..d5ce56b 100644 --- a/src/corelib/io/qnoncontiguousbytedevice.cpp +++ b/src/corelib/io/qnoncontiguousbytedevice.cpp @@ -501,8 +501,6 @@ QNonContiguousByteDevice* QNonContiguousByteDeviceFactory::create(QIODevice *dev } /*! - \fn static QNonContiguousByteDevice* QNonContiguousByteDeviceFactory::create(QRingBuffer *ringBuffer); - Create a QNonContiguousByteDevice out of a QRingBuffer. \internal diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 4226f9e..60a4ce3 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -63,8 +63,9 @@ unencoded representation is suitable for showing to users, but the encoded representation is typically what you would send to a web server. For example, the unencoded URL - "http://b\uuml\c{}hler.example.com" would be sent to the server as - "http://xn--bhler-kva.example.com/List%20of%20applicants.xml". + "http://b\uuml\c{}hler.example.com/List of applicants.xml" would be sent to the server as + "http://xn--bhler-kva.example.com/List%20of%20applicants.xml", + and this can be verified by calling the toEncoded() function. A URL can also be constructed piece by piece by calling setScheme(), setUserName(), setPassword(), setHost(), setPort(), |