QTemporaryFile: de-duplicate API docs wrt. XXXXXX template usage

Pick-to: 6.7
Change-Id: I6180d82aab65788b897df4410d13e68f221193cb
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6ccdb030ae8c604e6674d406036ad980f7767e45)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Ahmad Samir 2024-07-01 01:24:26 +03:00 committed by Qt Cherry-pick Bot
parent b7170f97d4
commit 7ad780e6f5

View File

@ -661,8 +661,13 @@ QTemporaryFile::QTemporaryFile()
templateName. Upon opening the temporary file this will be used to create templateName. Upon opening the temporary file this will be used to create
a unique filename. a unique filename.
If the \a templateName does not contain XXXXXX it will automatically be //! [dynamic-part-of-filename]
appended and used as the dynamic portion of the filename. If \a templateName doesn't contain \c {"XXXXXX"}, it will be added
automatically.
\c {"XXXXXX"} will be replaced with the dynamic part of the file name,
which is calculated to be unique.
//! [dynamic-part-of-filename]
If \a templateName is a relative path, the path will be relative to the If \a templateName is a relative path, the path will be relative to the
current working directory. You can use QDir::tempPath() to construct \a current working directory. You can use QDir::tempPath() to construct \a
@ -694,8 +699,7 @@ QTemporaryFile::QTemporaryFile(QObject *parent)
Upon opening the temporary file this will be used to Upon opening the temporary file this will be used to
create a unique filename. create a unique filename.
If the \a templateName does not contain XXXXXX it will automatically be \include qtemporaryfile.cpp dynamic-part-of-filename
appended and used as the dynamic portion of the filename.
If \a templateName is a relative path, the path will be relative to the If \a templateName is a relative path, the path will be relative to the
current working directory. You can use QDir::tempPath() to construct \a current working directory. You can use QDir::tempPath() to construct \a
@ -817,10 +821,11 @@ QString QTemporaryFile::fileTemplate() const
*/ */
/*! /*!
Sets the static portion of the file name to \a name. If the file \fn void QTemporaryFile::setFileTemplate(const QString &templateName)
template contains XXXXXX that will automatically be replaced with
the unique part of the filename, otherwise a filename will be Sets the file name template to \a templateName.
determined automatically based on the static portion specified.
\include qtemporaryfile.cpp dynamic-part-of-filename
If \a name contains a relative file path, the path will be relative to the If \a name contains a relative file path, the path will be relative to the
current working directory. You can use QDir::tempPath() to construct \a current working directory. You can use QDir::tempPath() to construct \a