Improve the QSP::clear() on Windows


Commit 9c88ad89801596e1d94acc4f32ff55c34118a66f solves a problem
partially. Still when used QSP::clear() with some devices (e.g.
virtual ports from the "AGG Software") the reading can be stalled.

It is reasonable to make following:

1. Prevent to reset the both readStarted and writeStarted variables
inside of QSP::clear() method. These variables shall be reset inside
of _q_completeXX() methods which will be called automatically from the
notifiers, since the PurgeComm should terminate pending read or write
operations.

2. Instead of startAsyncRead() should be called the
startAsyncCommunication(), that allow to correctly startup of the read
sequence.

This scenario can be reproduced with running of the
tst_QSerialPort::readAfterInputClear() autotest.

Tested on Windows 8 with the virtual com0com ports and with the
virtual ports from the "AGG Software" using Qt5.

Change-Id: Ic1a53334abd97667a9dd3291c3b975eb04062efd
Reviewed-by: Robert Kurjata <rkurjata@gmail.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
commit367ed19c803497105dd219039fbd8c69ba070296
parentcb2ff89d4250fb089d5cf0fb4aeecdc35ae526ac
authorDenis Shienkov <denis.shienkov@gmail.com>
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
commit timeThu, 27 Nov 2014 21:31:47 +0100