From 16f67b49ae5232d4d0fb19e0333f5e2ef2a65449 Mon Sep 17 00:00:00 2001 From: xiechyong Date: Thu, 27 Oct 2011 21:07:26 -0700 Subject: Fix QFile::copy() returning false but error() being NoError Calling close() after setError() will unset the error. Task-number: QTBUG-11982 Merge-request: 2712 Reviewed-by: ossi --- src/corelib/io/qfile.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 06c403a..6f24376 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; } -- cgit v0.12 From f0637d4c663ccfc45d337412c209fee1789f354d Mon Sep 17 00:00:00 2001 From: Jo Asplin Date: Mon, 31 Oct 2011 14:43:10 +0100 Subject: Updated changelog for Qt 4.8 Task-number: QTQAINFRA-226 --- dist/changes-4.8.0 | 2 ++ 1 file changed, 2 insertions(+) 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 * -- cgit v0.12