7#ifndef QT_NO_TEMPORARYFILE
12#include "qplatformdefs.h"
14#include "private/qtemporaryfile_p.h"
16#if defined(QT_BUILD_CORE_LIB)
30static_assert(std::is_nothrow_move_constructible_v<QTemporaryDir>);
31static_assert(std::is_nothrow_move_assignable_v<QTemporaryDir>);
60#if defined(QT_BUILD_CORE_LIB)
64 baseName =
"qt_temp"_L1;
72 for (
int i = 0;
i < 256; ++
i) {
83 const int exists = ERROR_ALREADY_EXISTS;
84 int code = GetLastError();
86 const int exists = EEXIST;
168 d_ptr->
create(templatePath);
320 qWarning() <<
"QTemporaryDir: Unable to remove"
322 <<
"most likely due to the presence of read-only files.";
QString applicationName
the name of this application
static bool isAbsolutePath(const QString &path)
Returns true if path is absolute; returns false if it is relative.
static QString tempPath()
Returns the absolute canonical path of the system's temporary directory.
static QString toNativeSeparators(const QString &pathName)
static bool createDirectory(const QFileSystemEntry &entry, bool createParents, std::optional< QFile::Permissions > permissions=std::nullopt)
Q_AUTOTEST_EXPORT QString filePath() const
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
void create(const QString &templateName)
bool remove()
Removes the temporary directory, including all its contents.
QTemporaryDir()
Constructs a QTemporaryDir using as template the application name returned by QCoreApplication::appli...
QString filePath(const QString &fileName) const
bool autoRemove() const
Returns true if the QTemporaryDir is in auto remove mode.
void setAutoRemove(bool b)
Sets the QTemporaryDir into auto-remove mode if b is true.
~QTemporaryDir()
Destroys the temporary directory object.
QString errorString() const
QString path() const
Returns the path to the temporary directory.
bool isValid() const
Returns true if the QTemporaryDir was created successfully.
Combined button and popup list for selecting options.
Q_DECL_COLD_FUNCTION Q_CORE_EXPORT QString qt_error_string(int errorCode=-1)
GLboolean GLboolean GLboolean b
#define qUtf8Printable(string)
static QString defaultTemplateName()
QFileSystemEntry::NativePath generateNext()
QFileSystemEntry::NativePath path