Doc: Fix incorrect mentioning of read*() methods in QSaveFile

QSaveFile can only be used with WriteOnly. Calling any read
method will print a runtime warning:

     QIODevice::read (QSaveFile): WriteOnly device

Pick-to: 6.8
Change-Id: Id721e4e1cba4b81c5504e3eff66420d363436010
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Kai Köhne 2024-11-25 14:57:05 +01:00
parent 5a6a9b1d5a
commit 439654cbd1

View File

@ -57,8 +57,8 @@ QSaveFilePrivate::~QSaveFilePrivate()
an error happened, and will discard the temporary file in commit().
Much like with QFile, the file is opened with open(). Data is usually read
and written using QDataStream or QTextStream, but you can also call the
QIODevice-inherited functions read(), readLine(), readAll(), write().
and written using QDataStream or QTextStream, but you can also directly call
\l write().
Unlike QFile, calling close() is not allowed. commit() replaces it. If commit()
was not called and the QSaveFile instance is destroyed, the temporary file is