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>
This commit is contained in:
parent
334460407b
commit
647bee6715
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user