Fix reading on Windows with the limited read buffer
The previous commit ac0422e8c9e74f2275129e3c7c69ef64299f07a9
already fix this issue on 5.4 branch, but in 5.5 branch this
issue is appeared again.
The reason is that in 5.5 branch is used the private read buffer
from the QIODevice, but in 5.4 branch is used the own read buffer.
In 5.5 when called the QSP::readData() then it always returns an
empty buffer, since the buffer is already read inside of QIODevice.
In this case the QSP::startAsyncRead() is never called, because a
condition in the QSP::readData() is always false. Need to call the
QSP::startAsyncRead() only if the buffer has a limited size or in
the HardwareFlow mode.
Tested on Windows 8 with the virtual com0com serial ports.
Change-Id: Idc1893f5be5034f89fc7a8fdc654a8375679c21d
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>