QFtp: Suppress warning about reading from closed QIODevice.
Clear bytesFromSocket when the socket is not open instead of reading in QFtpDTP::socketConnectionClosed(), which is connected to QTcpSocket::disconnected(). Task-number: QTBUG-46112 Change-Id: I0e5e47448f88601eb5c62fe9ba92e1a461323364 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
This commit is contained in:
parent
06de0da1e8
commit
0c85cdb8c2
@ -736,7 +736,10 @@ void QFtpDTP::socketConnectionClosed()
|
|||||||
clearData();
|
clearData();
|
||||||
}
|
}
|
||||||
|
|
||||||
bytesFromSocket = socket->readAll();
|
if (socket->isOpen())
|
||||||
|
bytesFromSocket = socket->readAll();
|
||||||
|
else
|
||||||
|
bytesFromSocket.clear();
|
||||||
#if defined(QFTPDTP_DEBUG)
|
#if defined(QFTPDTP_DEBUG)
|
||||||
qDebug("QFtpDTP::connectState(CsClosed)");
|
qDebug("QFtpDTP::connectState(CsClosed)");
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user