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>
commit133dbd59fb04974149d2140b267fce91a7cfd4a2
parent9d758fb370026cb531d98ba42e98a8d6fabe6c0a
authorDenis Shienkov <denis.shienkov@gmail.com>
committerDenis Shienkov <denis.shienkov@gmail.com>
commit timeWed, 20 Jul 2016 19:09:00 +0000