Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QTextStream: Always use direct connection inside QDeviceClosedNotifier
Force direct connection when connecting aboutToClose() signal of device to flushStream() slot of QDeviceClosedNotifier. This allows use of a QTextStream from multiple threads when synchronization is handled by the application. Queued connections from aboutToClose() don't make much sense because the device is closed immediately after emitting the signal. If a QTextStream object is used by threads different from the one where it was created, queued connection may result in attempting to flush the data after the associated device is already closed, and accessing the QTextStream's buffers from multiple threads. Fixes: QTBUG-12055 Change-Id: If601d0f04f08b248b21ed1630b7dfd3546aee068 Reviewed-by: Oswald Buddenhagen <[email protected]> Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Lars Knoll <[email protected]>
- Loading branch information