Doc: Improve QSaveFile::open description

Force the mentioned QIODevice flags to be links.
Use fully qualified name for the first flag mentioned,
but use the short form for the following ones for
better readability.

Mark true and false to be written in code style.

Task-number: QTBUG-131484
Pick-to: 6.8
Change-Id: I988ba66341b811c815953e5fd6d067204bdaae6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Kai Köhne 2024-11-22 13:20:47 +01:00
parent 56db60056b
commit 5a6a9b1d5a

View File

@ -143,16 +143,15 @@ void QSaveFile::setFileName(const QString &name)
} }
/*! /*!
Opens the file using OpenMode \a mode, returning true if successful; Opens the file using \a mode flags. Returns \c true if successful;
otherwise false. otherwise returns \c false.
Important: the \a mode must include QIODevice::WriteOnly. Important: The flags for \a mode must include \l QIODeviceBase::WriteOnly. Other
It may also have additional flags, such as QIODevice::Text and QIODevice::Unbuffered. common flags you can use are \l Text and \l Unbuffered. Flags not supported at the
moment are \l ReadOnly (and therefore \l ReadWrite), \l Append, \l NewOnly and \l ExistingOnly;
they will generate a runtime warning.
QIODevice::ReadWrite, QIODevice::Append, QIODevice::NewOnly and \sa setFileName(), QT_USE_NODISCARD_FILE_OPEN
QIODevice::ExistingOnly are not supported at the moment.
\sa QIODevice::OpenMode, setFileName(), QT_USE_NODISCARD_FILE_OPEN
*/ */
bool QSaveFile::open(OpenMode mode) bool QSaveFile::open(OpenMode mode)
{ {