diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index cb703df8c6..0411b463b3 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -696,7 +696,7 @@ void QTextStreamPrivate::flushWriteBuffer() // flush the file #ifndef QT_NO_QOBJECT - QFile *file = qobject_cast(device); + QFileDevice *file = qobject_cast(device); bool flushed = !file || file->flush(); #else bool flushed = true;