Detach buffer's segment for asynchronous write operation
QRingBuffer does not guarantee that the read pointer which is
returned by QRingBuffer::readPointer() will stay valid after
calling QRingBuffer::reserve() or QRingBuffer::append().
Thus, we need to detach the buffer's segment and pass it to the
WriteFile() function to ensure it stays unmodified for the whole
time of the asynchronous operation.
Change-Id: I5a42086b4339a050a4df57c39348864502be2c74
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>