Skip to content

Add QIODevice::canReadLine call to QBluetoothSocket

At least on Linux the QIODevice parent class reads and buffers a large chunk of data when readLine() is called. This call effectively empties the private linear data buffer, and subsequent canReadLine() calls to the private buffer returns false. This is problematic if the data contained several lines of data; the QBluetoothSocket::canReadLine() returns false but readLine() returns valid lines of data.

This commit adds a parent class call so that it's buffers are also taken into account as per QIODevice documentation.

Fixes: QTBUG-101690 Pick-to: 5.15 6.2 6.3 Change-Id: I8130aff217e9e6c5525101901ed55721430b6dd0 Reviewed-by: Ivan Solovev ivan.solovev@qt.io Reviewed-by: Alex Blasche alexander.blasche@qt.io (cherry picked from commit 393fd47a)

Merge request reports