QAbstractSocket::canReadLine(): remove code duplication
Contents of the QIODevice's buffer is handled in the base implementation. Change-Id: I5a3d68e4e8dcb16d7f5ad695ac43127b8047a061 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
194403a348
commit
6fca88607b
@ -1810,12 +1810,12 @@ QString QAbstractSocket::peerName() const
|
||||
*/
|
||||
bool QAbstractSocket::canReadLine() const
|
||||
{
|
||||
bool hasLine = d_func()->buffer.canReadLine();
|
||||
bool hasLine = QIODevice::canReadLine();
|
||||
#if defined (QABSTRACTSOCKET_DEBUG)
|
||||
qDebug("QAbstractSocket::canReadLine() == %s, buffer size = %lld, size = %lld",
|
||||
hasLine ? "true" : "false", d_func()->buffer.size(), d_func()->buffer.size());
|
||||
#endif
|
||||
return hasLine || QIODevice::canReadLine();
|
||||
return hasLine;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -149,7 +149,7 @@ public:
|
||||
qint64 bytesAvailable() const Q_DECL_OVERRIDE;
|
||||
qint64 bytesToWrite() const Q_DECL_OVERRIDE;
|
||||
|
||||
bool canReadLine() const Q_DECL_OVERRIDE;
|
||||
bool canReadLine() const Q_DECL_OVERRIDE; // ### Qt6: remove me
|
||||
|
||||
quint16 localPort() const;
|
||||
QHostAddress localAddress() const;
|
||||
|
Loading…
Reference in New Issue
Block a user