replace hardcoded enum value in QAbstractSocketEnginePrivate::setError()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-05-27 06:57:52 +03:00
parent 719cdd159a
commit 0cc6689f84
2 changed files with 4 additions and 4 deletions

View file

@ -319,14 +319,14 @@ void QAbstractSocketEnginePrivate::setError(QAbstractSocket::SocketError error,
if (hasSetSocketError) {
// Only set socket errors once for one engine; expect the
// socket to recreate its engine after an error. Note: There's
// one exception: SocketError(11) bypasses this as it's purely
// a temporary internal error condition.
// one exception: UnfinishedSocketOperationError bypasses this
// as it's purely a temporary internal error condition.
// Another exception is the way the waitFor*() functions set
// an error when a timeout occurs. After the call to setError()
// they reset the hasSetSocketError to false
return;
}
if (error != QAbstractSocket::SocketError(11))
if (error != QAbstractSocket::UnfinishedSocketOperationError)
hasSetSocketError = true;
socketError = error;

View file

@ -108,7 +108,7 @@ public:
qint64 pendingDatagramSize() const;
#endif // QT_NO_UDPSOCKET
qint64 bytesToWrite() const ;
qint64 bytesToWrite() const;
int option(SocketOption option) const;
bool setOption(SocketOption option, int value);