Fix QIODevice warning when running rcc.
authorMitch Curtis <mitch.curtis@nokia.com>
Mon, 11 Jun 2012 11:32:17 +0000 (13:32 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 26 Jun 2012 17:30:00 +0000 (19:30 +0200)
commit98803a76b3a423cad8e0287337d5cfc5f8aae58c
treebfc6a4757b244a8e530b4193dc73e1d80b123832
parent003d294cd6cd0567a24cddb7e27ba5880fd2a599
Fix QIODevice warning when running rcc.

When opening a QFile on stdout, for example,
we must not call seek as it is a sequential device.
This has been flagged as a warning since commit Ie3a96d3a
and has resulted in spurious warnings being emitted.

In the case of opening a QFile in Append mode, QIODevice::open
already sets the position marker, so calling seek is redundant.
This is also true for the file engine's open function (called
through openExternalFile()), which also ensures the handle or
descriptor is repositioned appropriately.

Task-number: QTBUG-26104
Change-Id: I71040c399efe54e7538f54433368b432e959e08d
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
src/corelib/io/qfile.cpp
tests/auto/corelib/io/qfile/tst_qfile.cpp