QTemporaryDir: Output warnings on removal failure.
Change-Id: I38d0a07c355f73899cc5f6eac60bd8cbedc73cb2 Reviewed-by: David Faure <david.faure@kdab.com>bb10
parent
f6dc131628
commit
7d4236d281
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue