diff options
Diffstat (limited to 'src/corelib/io/qfile.cpp')
-rw-r--r-- | src/corelib/io/qfile.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index f0a6676..d7da800 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -900,7 +900,10 @@ QFile::copy(const QString &newName) error = true; d->setError(QFile::CopyError, tr("Cannot create %1 for output").arg(newName)); } -#ifndef QT_NO_TEMPORARYFILE +#ifdef QT_NO_TEMPORARYFILE + if (error) + out.remove(); +#else if (!error) out.setAutoRemove(false); #endif |