diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-02-28 08:40:53 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-02-28 09:48:30 +0100 |
commit | a450cce6b670dbcac84fcc4a66fc632b31ce8414 (patch) | |
tree | 35b77fa22c4def97b619bd3a87f6d394e452bb2e /src/network/access | |
parent | f6f6eab89f57fb0db8f623f4a92a7b9c4ba6e9ea (diff) | |
parent | 4c86e667d220e27bb4b6e370675ffb2872e8521c (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I469b0501cc65fc5ce4d797a69ae89405cc69c7f8
Diffstat (limited to 'src/network/access')
-rw-r--r-- | src/network/access/qftp.cpp | 6 | ||||
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 2 | ||||
-rw-r--r-- | src/network/access/qhttpprotocolhandler.cpp | 2 | ||||
-rw-r--r-- | src/network/access/qnetworkaccessdebugpipebackend.cpp | 6 | ||||
-rw-r--r-- | src/network/access/qnetworkaccessmanager.cpp | 2 | ||||
-rw-r--r-- | src/network/access/qnetworkreply.cpp | 23 | ||||
-rw-r--r-- | src/network/access/qnetworkreply.h | 7 | ||||
-rw-r--r-- | src/network/access/qnetworkrequest.cpp | 2 |
8 files changed, 13 insertions, 37 deletions
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp index cda800ce35..2589c64b1c 100644 --- a/src/network/access/qftp.cpp +++ b/src/network/access/qftp.cpp @@ -324,7 +324,7 @@ void QFtpDTP::connectToHost(const QString & host, quint16 port) socket->setObjectName(QLatin1String("QFtpDTP Passive state socket")); connect(socket, SIGNAL(connected()), SLOT(socketConnected())); connect(socket, SIGNAL(readyRead()), SLOT(socketReadyRead())); - connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(socketError(QAbstractSocket::SocketError))); + connect(socket, SIGNAL(errorOccurred(QAbstractSocket::SocketError)), SLOT(socketError(QAbstractSocket::SocketError))); connect(socket, SIGNAL(disconnected()), SLOT(socketConnectionClosed())); connect(socket, SIGNAL(bytesWritten(qint64)), SLOT(socketBytesWritten(qint64))); @@ -769,7 +769,7 @@ void QFtpDTP::setupSocket() socket->setObjectName(QLatin1String("QFtpDTP Active state socket")); connect(socket, SIGNAL(connected()), SLOT(socketConnected())); connect(socket, SIGNAL(readyRead()), SLOT(socketReadyRead())); - connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(socketError(QAbstractSocket::SocketError))); + connect(socket, SIGNAL(errorOccurred(QAbstractSocket::SocketError)), SLOT(socketError(QAbstractSocket::SocketError))); connect(socket, SIGNAL(disconnected()), SLOT(socketConnectionClosed())); connect(socket, SIGNAL(bytesWritten(qint64)), SLOT(socketBytesWritten(qint64))); @@ -807,7 +807,7 @@ QFtpPI::QFtpPI(QObject *parent) : SLOT(connectionClosed())); connect(&commandSocket, SIGNAL(readyRead()), SLOT(readyRead())); - connect(&commandSocket, SIGNAL(error(QAbstractSocket::SocketError)), + connect(&commandSocket, SIGNAL(errorOccurred(QAbstractSocket::SocketError)), SLOT(error(QAbstractSocket::SocketError))); connect(&dtp, SIGNAL(connectState(int)), diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 65c2ae3054..c1bb19650f 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -156,7 +156,7 @@ void QHttpNetworkConnectionChannel::init() QObject::connect(socket, SIGNAL(disconnected()), this, SLOT(_q_disconnected()), Qt::DirectConnection); - QObject::connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), + QObject::connect(socket, SIGNAL(errorOccurred(QAbstractSocket::SocketError)), this, SLOT(_q_error(QAbstractSocket::SocketError)), Qt::DirectConnection); diff --git a/src/network/access/qhttpprotocolhandler.cpp b/src/network/access/qhttpprotocolhandler.cpp index 981effb54f..d39589fb96 100644 --- a/src/network/access/qhttpprotocolhandler.cpp +++ b/src/network/access/qhttpprotocolhandler.cpp @@ -233,7 +233,7 @@ void QHttpProtocolHandler::_q_readyRead() char c; qint64 ret = m_socket->peek(&c, 1); if (ret < 0) { - m_channel->_q_error(m_socket->socketError()); + m_channel->_q_error(m_socket->error()); // We still need to handle the reply so it emits its signals etc. if (m_reply) _q_receiveReply(); diff --git a/src/network/access/qnetworkaccessdebugpipebackend.cpp b/src/network/access/qnetworkaccessdebugpipebackend.cpp index 0406f2fac1..0029df41fe 100644 --- a/src/network/access/qnetworkaccessdebugpipebackend.cpp +++ b/src/network/access/qnetworkaccessdebugpipebackend.cpp @@ -98,7 +98,7 @@ void QNetworkAccessDebugPipeBackend::open() // socket ready read -> we can push from socket to downstream connect(&socket, SIGNAL(readyRead()), SLOT(socketReadyRead())); - connect(&socket, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(socketError())); + connect(&socket, SIGNAL(errorOccurred(QAbstractSocket::SocketError)), SLOT(socketError())); connect(&socket, SIGNAL(disconnected()), SLOT(socketDisconnected())); connect(&socket, SIGNAL(connected()), SLOT(socketConnected())); // socket bytes written -> we can push more from upstream to socket @@ -242,9 +242,9 @@ void QNetworkAccessDebugPipeBackend::closeDownstreamChannel() void QNetworkAccessDebugPipeBackend::socketError() { - qWarning("QNetworkAccessDebugPipeBackend::socketError() %d",socket.socketError()); + qWarning("QNetworkAccessDebugPipeBackend::socketError() %d",socket.error()); QNetworkReply::NetworkError code; - switch (socket.socketError()) { + switch (socket.error()) { case QAbstractSocket::RemoteHostClosedError: return; // socketDisconnected will be called diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 85f065223a..21d46011d7 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -1726,7 +1726,7 @@ int QNetworkAccessManager::transferTimeout() const Transfers are aborted if no bytes are transferred before the timeout expires. Zero means no timer is set. If no argument is provided, the timeout is - QNetworkRequest::TransferTimeoutPreset. If this function + QNetworkRequest::DefaultTransferTimeoutConstant. If this function is not called, the timeout is disabled and has the value zero. The request-specific non-zero timeouts set for the requests that are executed override this value. This means diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp index c22dce8f1c..fb30bfd4f1 100644 --- a/src/network/access/qnetworkreply.cpp +++ b/src/network/access/qnetworkreply.cpp @@ -554,32 +554,13 @@ QNetworkAccessManager::Operation QNetworkReply::operation() const return d_func()->operation; } -#if QT_DEPRECATED_SINCE(5, 15) /*! - \deprecated - - Use networkError() instead. - - Returns the error that was found during the processing of this - request. If no error was found, returns NoError. - - \sa setError(), networkError() -*/ -QNetworkReply::NetworkError QNetworkReply::error() const -{ - return networkError(); -} -#endif // QT_DEPRECATED_SINCE(5, 15) - -/*! - \since 5.15 - Returns the error that was found during the processing of this request. If no error was found, returns NoError. \sa setError() */ -QNetworkReply::NetworkError QNetworkReply::networkError() const +QNetworkReply::NetworkError QNetworkReply::error() const { return d_func()->errorCode; } @@ -877,7 +858,7 @@ void QNetworkReply::setRequest(const QNetworkRequest &request) Calling setError() does not emit the error(QNetworkReply::NetworkError) signal. - \sa error(), errorString(), networkError() + \sa error(), errorString() */ void QNetworkReply::setError(NetworkError errorCode, const QString &errorString) { diff --git a/src/network/access/qnetworkreply.h b/src/network/access/qnetworkreply.h index 139009a56a..4a402daa91 100644 --- a/src/network/access/qnetworkreply.h +++ b/src/network/access/qnetworkreply.h @@ -124,12 +124,7 @@ public: QNetworkAccessManager *manager() const; QNetworkAccessManager::Operation operation() const; QNetworkRequest request() const; - -#if QT_DEPRECATED_SINCE(5, 15) - QT_DEPRECATED_X("Use networkError()") NetworkError error() const; -#endif // QT_DEPRECATED_SINCE(5, 15) - NetworkError networkError() const; - + NetworkError error() const; bool isFinished() const; bool isRunning() const; QUrl url() const; diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index 4765fdc30e..33526bb7d5 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -931,7 +931,7 @@ int QNetworkRequest::transferTimeout() const Transfers are aborted if no bytes are transferred before the timeout expires. Zero means no timer is set. If no argument is provided, the timeout is - QNetworkRequest::TransferTimeoutPreset. If this function + QNetworkRequest::DefaultTransferTimeoutConstant. If this function is not called, the timeout is disabled and has the value zero. |