diff options
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qnetworkreply.cpp | 2 | ||||
-rw-r--r-- | src/network/socket/qabstractsocket.cpp | 11 | ||||
-rw-r--r-- | src/network/ssl/qsslconfiguration.cpp | 1 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket.cpp | 1 |
4 files changed, 12 insertions, 3 deletions
diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp index 18ff05fcd7..fe9564a91c 100644 --- a/src/network/access/qnetworkreply.cpp +++ b/src/network/access/qnetworkreply.cpp @@ -605,7 +605,7 @@ QList<QByteArray> QNetworkReply::rawHeaderList() const /*! Returns the attribute associated with the code \a code. If the - attribute has not been set, it returns an invalid QVariant (type QMetaType::Unknown). + attribute has not been set, it returns an invalid QVariant (type QMetaType::UnknownType). You can expect the default values listed in QNetworkRequest::Attribute to be applied to the values returned by diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 604214ce8e..5a1ad40b90 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -740,8 +740,15 @@ bool QAbstractSocketPrivate::canReadNotification() return true; } - if ((isBuffered || socketType != QAbstractSocket::TcpSocket) && socketEngine) - socketEngine->setReadNotificationEnabled(readBufferMaxSize == 0 || readBufferMaxSize > q->bytesAvailable()); + if (socketEngine) { + // turn the socket engine off if we've either: + // - got pending datagrams + // - reached the buffer size limit + if (isBuffered) + socketEngine->setReadNotificationEnabled(readBufferMaxSize == 0 || readBufferMaxSize > q->bytesAvailable()); + else if (socketType != QAbstractSocket::TcpSocket) + socketEngine->setReadNotificationEnabled(!socketEngine->hasPendingDatagrams()); + } // reset the read socket notifier state if we reentered inside the // readyRead() connected slot. diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp index 7bb6e02b7e..55c9a281ba 100644 --- a/src/network/ssl/qsslconfiguration.cpp +++ b/src/network/ssl/qsslconfiguration.cpp @@ -512,6 +512,7 @@ QSslCipher QSslConfiguration::sessionCipher() const is set during the handshake phase. \sa protocol(), setProtocol() + \since 5.4 */ QSsl::SslProtocol QSslConfiguration::sessionProtocol() const { diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index 0f7c376e04..c0c15fb5b1 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -1081,6 +1081,7 @@ QSslCipher QSslSocket::sessionCipher() const is set during the handshake phase. \sa protocol(), setProtocol() + \since 5.4 */ QSsl::SslProtocol QSslSocket::sessionProtocol() const { |