Port file-flushing code to QFileDevice.

This fixes auto-flushing in the future QSaveFile class.

Change-Id: I6e84388070d5b9af9d326f5092ec9b55fd98cd05
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
bb10
David Faure 2012-03-12 15:45:15 +01:00 committed by Qt by Nokia
parent e104fe7266
commit 7786d15e93
1 changed files with 1 additions and 1 deletions

View File

@ -696,7 +696,7 @@ void QTextStreamPrivate::flushWriteBuffer()
// flush the file
#ifndef QT_NO_QOBJECT
QFile *file = qobject_cast<QFile *>(device);
QFileDevice *file = qobject_cast<QFileDevice *>(device);
bool flushed = !file || file->flush();
#else
bool flushed = true;