summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-12-16 13:17:22 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-12-16 13:57:43 (GMT)
commitca062f6ed45acf83720faec8a211d9bf91705b2c (patch)
treec1fa410b516cc938ee1501bc3dc271ba6bcd3245
parent66eec88591be2e8369e73dc5c86148cb4b09fad8 (diff)
downloadQt-ca062f6ed45acf83720faec8a211d9bf91705b2c.zip
Qt-ca062f6ed45acf83720faec8a211d9bf91705b2c.tar.gz
Qt-ca062f6ed45acf83720faec8a211d9bf91705b2c.tar.bz2
don't report flush error when we didn't flush in the first place
this went unnoticed, as the return value is ignored - so far. Reviewed-by: mariusSO
-rw-r--r--src/corelib/io/qtextstream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp
index f4731f9..560766a 100644
--- a/src/corelib/io/qtextstream.cpp
+++ b/src/corelib/io/qtextstream.cpp
@@ -693,7 +693,7 @@ bool QTextStreamPrivate::flushWriteBuffer()
// flush the file
#ifndef QT_NO_QOBJECT
QFile *file = qobject_cast<QFile *>(device);
- bool flushed = file && file->flush();
+ bool flushed = !file || file->flush();
#else
bool flushed = true;
#endif