fix an incorrect OpenMode flags handling in QBuffer::open()
authorRitt Konstantin <ritt.ks@gmail.com>
Fri, 10 Jun 2011 09:10:49 +0000 (11:10 +0200)
committerQt Continuous Integration System <qt-info@nokia.com>
Fri, 10 Jun 2011 11:14:04 +0000 (13:14 +0200)
commitfc74b4e56430ac6aa6c26a10eaa552df3aa34380
treeb8ff66d797004d2c9c9819398ab641141fea4744
parentc1ed7951acc29502a8eb7cc23942e5e455e6165d
fix an incorrect OpenMode flags handling in QBuffer::open()

which leads to absurd statement (QBuffer::open() == !QBuffer::isOpen()) to be true.
also treat Truncate as (Truncate | WriteOnly) to satisfy lazy ones

Reviewed-by: Joao
Merge-request: 2612
(cherry picked from commit 6b91affb9a355e668bc9d06dee580d95230ac63a)

Change-Id: I657d4d0a33f7993313fe2a1a8ba408371991717f
Reviewed-on: http://codereview.qt.nokia.com/447
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
src/corelib/io/qbuffer.cpp
tests/auto/qbuffer/tst_qbuffer.cpp