QTemporaryFile: de-duplicate docs wrt. the file name relative/absolute
Make it clearer in fileTemplate() and fileName() that the returned path will be relative or absolute depending on the specified file name template. Task-number: QTBUG-124653 Pick-to: 6.7 Change-Id: Iccb7a6d0ced2cadeacea7d14d3f6e924705b4d58 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 9a5e3e1f4064e275da3370f5dd27e87900da8c45)
This commit is contained in:
parent
431ca49614
commit
ec349e0c00
@ -672,9 +672,12 @@ QTemporaryFile::QTemporaryFile()
|
||||
which is calculated to be unique.
|
||||
//! [dynamic-part-of-filename]
|
||||
|
||||
//! [filename-relative-or-absolute-path]
|
||||
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
|
||||
templateName if you want use the system's temporary directory.
|
||||
//! [filename-relative-or-absolute-path]
|
||||
|
||||
\include qtemporaryfile.cpp note-about-rename-method
|
||||
|
||||
\sa open(), fileTemplate()
|
||||
@ -704,9 +707,7 @@ QTemporaryFile::QTemporaryFile(QObject *parent)
|
||||
|
||||
\include qtemporaryfile.cpp dynamic-part-of-filename
|
||||
|
||||
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
|
||||
templateName if you want use the system's temporary directory.
|
||||
\include qtemporaryfile.cpp filename-relative-or-absolute-path
|
||||
\include qtemporaryfile.cpp note-about-rename-method
|
||||
|
||||
\sa open(), fileTemplate()
|
||||
@ -791,6 +792,10 @@ void QTemporaryFile::setAutoRemove(bool b)
|
||||
afterwards it will contain the fileTemplate() plus
|
||||
additional characters to make it unique.
|
||||
|
||||
The file name returned by this method is relative or absolute depending on
|
||||
the file name template used to construct this object (or passed to
|
||||
setFileTemplate()) being relative or absolute, respectively.
|
||||
|
||||
\sa fileTemplate()
|
||||
*/
|
||||
|
||||
@ -809,6 +814,10 @@ QString QTemporaryFile::fileName() const
|
||||
/*!
|
||||
Returns the file name template.
|
||||
|
||||
The file name template returned by this method, will be relative or
|
||||
absolute depending on the file name template used to construct this object
|
||||
(or passed to setFileTemplate()) being relative or absolute, respectively.
|
||||
|
||||
\sa setFileTemplate(), fileName(), {Default File Name Template}
|
||||
*/
|
||||
QString QTemporaryFile::fileTemplate() const
|
||||
@ -830,12 +839,10 @@ QString QTemporaryFile::fileTemplate() const
|
||||
|
||||
\include qtemporaryfile.cpp dynamic-part-of-filename
|
||||
|
||||
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
|
||||
name if you want use the system's temporary directory.
|
||||
\include qtemporaryfile.cpp filename-relative-or-absolute-path
|
||||
\include qtemporaryfile.cpp note-about-rename-method
|
||||
|
||||
\sa fileTemplate()
|
||||
\sa fileTemplate(), fileName()
|
||||
*/
|
||||
void QTemporaryFile::setFileTemplate(const QString &name)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user