summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2024-12-04 16:40:38 +0100
committerKai Köhne <kai.koehne@qt.io>2024-12-13 09:10:14 +0000
commit647bee67150dedbd2a9fd2ddcd265d535e8fd8cf (patch)
tree8345c10ba8b6d924c266b868555f74d27a53f35b /src
parent334460407b7cde1cdab5cfe5abe00175893749c3 (diff)
Doc: Improve QFile::open description
Force the mentioned QIODeviceBase flags to be links. Use fully qualified name for the first flag mentioned, but use the short form for the rest to improve readability. Mark true and false to be written in code style. Task-number: QTBUG-131484 Pick-to: 6.8 6.9 Change-Id: Iebb0f9c6df382327bc5980e9e06c11deb6658291 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfile.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 74b89d986c2..b427a0ef7ca 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -902,14 +902,14 @@ QFile::copy(const QString &fileName, const QString &newName)
}
/*!
- Opens the file using OpenMode \a mode, returning true if successful;
- otherwise false.
+ Opens the file using \a mode flags, returning \c true if successful;
+ otherwise returns \c false.
- The \a mode must be QIODevice::ReadOnly, QIODevice::WriteOnly, or
- QIODevice::ReadWrite. It may also have additional flags, such as
- QIODevice::Text and QIODevice::Unbuffered.
+ The flags for \a mode must include \l QIODeviceBase::ReadOnly,
+ \l WriteOnly, or \l ReadWrite. It may also have additional flags,
+ such as \l Text and \l Unbuffered.
- \note In \l{QIODevice::}{WriteOnly} or \l{QIODevice::}{ReadWrite}
+ \note In \l{WriteOnly} or \l{ReadWrite}
mode, if the relevant file does not already exist, this function
will try to create a new file before opening it. The file will be
created with mode 0666 masked by the umask on POSIX systems, and
@@ -918,9 +918,7 @@ QFile::copy(const QString &fileName, const QString &newName)
of the file name, otherwise, it won't be possible to create this
non-existing file.
- \sa QT_USE_NODISCARD_FILE_OPEN
-
- \sa QIODevice::OpenMode, setFileName()
+ \sa QT_USE_NODISCARD_FILE_OPEN, setFileName()
*/
bool QFile::open(OpenMode mode)
{