summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qtemporaryfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qtemporaryfile.cpp')
-rw-r--r--src/corelib/io/qtemporaryfile.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp
index bc6c2f1f06..54b59e802e 100644
--- a/src/corelib/io/qtemporaryfile.cpp
+++ b/src/corelib/io/qtemporaryfile.cpp
@@ -703,18 +703,20 @@ void QTemporaryFile::setFileTemplate(const QString &name)
/*!
- If \a file is not already a native file then a QTemporaryFile is created
- in the tempPath() and \a file is copied into the temporary file, then a
- pointer to the temporary file is returned. If \a file is already a native
- file, a QTemporaryFile is not created, no copy is made and 0 is returned.
+ If \a file is not already a native file, then a QTemporaryFile is created
+ in QDir::tempPath(), the contents of \a file is copied into it, and a pointer
+ to the temporary file is returned. Does nothing and returns \c 0 if \a file
+ is already a native file.
For example:
+ \code
QFile f(":/resources/file.txt");
QTemporaryFile::createNativeFile(f); // Returns a pointer to a temporary file
QFile f("/users/qt/file.txt");
QTemporaryFile::createNativeFile(f); // Returns 0
+ \endcode
\sa QFileInfo::isNativePath()
*/