diff options
author | Water-Team <water@pad.test.qt.nokia.com> | 2011-11-01 00:00:12 (GMT) |
---|---|---|
committer | Water-Team <water@pad.test.qt.nokia.com> | 2011-11-01 00:00:12 (GMT) |
commit | f4dc4e6370289b022e4b9d05b1afdac59e7813d1 (patch) | |
tree | c5f73a4aad5bc850c5c0da7f84c01c946f935224 | |
parent | ecc412f02004d4e6c0b56d4daa54a387131619dc (diff) | |
parent | b8ab878f68504b56c1ed8b434b769494feb827a1 (diff) | |
download | Qt-f4dc4e6370289b022e4b9d05b1afdac59e7813d1.zip Qt-f4dc4e6370289b022e4b9d05b1afdac59e7813d1.tar.gz Qt-f4dc4e6370289b022e4b9d05b1afdac59e7813d1.tar.bz2 |
Merge branch '4.8-upstream' into master-water
-rw-r--r-- | dist/changes-4.8.0 | 2 | ||||
-rw-r--r-- | src/corelib/io/qfile.cpp | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/dist/changes-4.8.0 b/dist/changes-4.8.0 index 56ed764..29e7648 100644 --- a/dist/changes-4.8.0 +++ b/dist/changes-4.8.0 @@ -197,6 +197,8 @@ QtTest ------ - Added -random and -seed options to tests, making the test cases within a test execute in arbitrary order. + - Added -datatags option to list available data tags for each test function. + The test case name is also listed. **************************************************************************** * Database Drivers * diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index d08574d..cdee7ce 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -918,6 +918,7 @@ QFile::copy(const QString &newName) #endif if (error) { out.close(); + close(); d->setError(QFile::CopyError, tr("Cannot open for output")); } else { char block[4096]; @@ -928,6 +929,7 @@ QFile::copy(const QString &newName) break; totalRead += in; if(in != out.write(block, in)) { + close(); d->setError(QFile::CopyError, tr("Failure to write block")); error = true; break; @@ -941,6 +943,7 @@ QFile::copy(const QString &newName) } if (!error && !out.rename(newName)) { error = true; + close(); d->setError(QFile::CopyError, tr("Cannot create %1 for output").arg(newName)); } #ifdef QT_NO_TEMPORARYFILE @@ -951,10 +954,10 @@ QFile::copy(const QString &newName) out.setAutoRemove(false); #endif } - close(); } if(!error) { QFile::setPermissions(newName, permissions()); + close(); unsetError(); return true; } |