diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-10-02 12:24:14 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-03 21:43:49 +0200 |
commit | 7d4236d28133519c30d1c500442393c87439b1f9 (patch) | |
tree | 0b9c2bf4e6bbc734b5b27df36d4b4bc740e59fa6 /src/corelib/io | |
parent | f6dc1316289542280d6cac4898458f28157999f7 (diff) |
QTemporaryDir: Output warnings on removal failure.
Change-Id: I38d0a07c355f73899cc5f6eac60bd8cbedc73cb2
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qtemporarydir.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/corelib/io/qtemporarydir.cpp b/src/corelib/io/qtemporarydir.cpp index 755c31f371..f21403d7f1 100644 --- a/src/corelib/io/qtemporarydir.cpp +++ b/src/corelib/io/qtemporarydir.cpp @@ -299,7 +299,13 @@ bool QTemporaryDir::remove() Q_ASSERT(!path().isEmpty()); Q_ASSERT(path() != QLatin1String(".")); - return QDir(path()).removeRecursively(); + const bool result = QDir(path()).removeRecursively(); + if (!result) { + qWarning() << "QTemporaryDir: Unable to remove" + << QDir::toNativeSeparators(path()) + << "most likely due to the presence of read-only files."; + } + return result; } QT_END_NAMESPACE |