Fix events handling in waitForBytesWritten() method on Windows


In case of communication event is triggered in the
waitForBytesWritten() method then necessary to process it with
the _q_completeAsyncCommunication() method, but not with the
_q_completeAsyncRead() method.

Otherwise it leads to false filling of the readBuffer with the
data that were read earlier (or with garbage) which remained in
readChunkBuffer.

The synchronous loopback autotest reproduces a bug without of
this patch.

Tested on Windows 7/8 with the on-board and USB serial ports,
using Qt5.

Task-number: QTBUG-40344
Change-Id: I679109b60f4058c4c6f7e5f02c1f70ba6039d8d8
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
commit26504a5fe1c13af3b84b60eb2a5eb754c80d3c22
parent76f293bfb0fd7bab391f96ac822eacc40e4c5176
authorDenis Shienkov <denis.shienkov@gmail.com>
committerDenis Shienkov <denis.shienkov@gmail.com>
commit timeWed, 30 Jul 2014 10:32:40 +0200