From ca062f6ed45acf83720faec8a211d9bf91705b2c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 16 Dec 2010 14:17:22 +0100 Subject: 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 --- src/corelib/io/qtextstream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(device); - bool flushed = file && file->flush(); + bool flushed = !file || file->flush(); #else bool flushed = true; #endif -- cgit v0.12