From 2c3221dd07b88fe047a6a0e4ee0d1a20b940162c Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 23 Jan 2012 15:29:49 +0100 Subject: [PATCH] Add missing documentation to QTemporaryDir constructors Change-Id: Ic7dea331695fa4653e4b963fef8383f44c3b1fb8 Reviewed-by: Jonas Gastal Reviewed-by: Robin Burchell --- src/corelib/io/qtemporarydir.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/corelib/io/qtemporarydir.cpp b/src/corelib/io/qtemporarydir.cpp index e80f42e4d2..2b139736dc 100644 --- a/src/corelib/io/qtemporarydir.cpp +++ b/src/corelib/io/qtemporarydir.cpp @@ -163,12 +163,32 @@ void QTemporaryDirPrivate::create(const QString &templateName) \sa QDir::tempPath(), QDir, QTemporaryFile */ +/*! + Constructs a QTemporaryDir using as template the application name + returned by QCoreApplication::applicationName() (otherwise \c qt_temp). + The directory is stored in the system's temporary directory, QDir::tempPath(). + + \sa QDir::tempPath() +*/ QTemporaryDir::QTemporaryDir() : d_ptr(new QTemporaryDirPrivate) { d_ptr->create(defaultTemplateName()); } +/*! + Constructs a QTemporaryFile with a template name of \a templateName. + + 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. + + If the \a templateName ends with XXXXXX it will be used as the dynamic portion + of the directory name, otherwise it will be appended. + Unlike QTemporaryFile, XXXXXX in the middle of the template string is not supported. + + \sa QDir::tempPath() +*/ QTemporaryDir::QTemporaryDir(const QString &templateName) : d_ptr(new QTemporaryDirPrivate) {