diff options
author | Liang Qi <liang.qi@qt.io> | 2017-04-20 11:19:14 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-04-20 12:31:27 +0200 |
commit | 7950b6b283549c98f1e0f981c84b68071a13b616 (patch) | |
tree | cf7281872045ebd57c68e10064ff0f400084aa13 /src/network | |
parent | 58d2927861d3e57cac4f6db599e209d2bfb17a2c (diff) | |
parent | 0794d61c822585530243f638687b8a75f0a15d0c (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
src/corelib/tools/qbytearray.h
src/corelib/tools/qdatetime.h
src/corelib/tools/qstring.h
src/corelib/tools/qversionnumber.h
src/plugins/platforms/android/qandroidplatformintegration.cpp
tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp
Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qhstspolicy.cpp | 8 | ||||
-rw-r--r-- | src/network/access/qnetworkaccessftpbackend.cpp | 2 | ||||
-rw-r--r-- | src/network/access/qnetworkaccessmanager.cpp | 6 | ||||
-rw-r--r-- | src/network/access/qnetworkreplyhttpimpl.cpp | 6 | ||||
-rw-r--r-- | src/network/ssl/qsslellipticcurve.h | 4 |
5 files changed, 16 insertions, 10 deletions
diff --git a/src/network/access/qhstspolicy.cpp b/src/network/access/qhstspolicy.cpp index 0ea9f3f046..ab4695480b 100644 --- a/src/network/access/qhstspolicy.cpp +++ b/src/network/access/qhstspolicy.cpp @@ -103,11 +103,11 @@ QHstsPolicy::QHstsPolicy() : d(new QHstsPolicyPrivate) } /*! - Constructs QHstsPolicy with \a expiry (in UTC); \a includeSubDomains parameter - defines if this policy must also include subdomains, \a host data is interpreted - according to \a mode. + Constructs QHstsPolicy with \a expiry (in UTC): + - \a host data is interpreted according to \a mode; + - \a flags selects options to apply to this policy. - \sa QUrl::setHost(), QUrl::ParsingMode + \sa QUrl::setHost(), QUrl::ParsingMode, QHstsPolicy::PolicyFlag */ QHstsPolicy::QHstsPolicy(const QDateTime &expiry, PolicyFlags flags, const QString &host, QUrl::ParsingMode mode) diff --git a/src/network/access/qnetworkaccessftpbackend.cpp b/src/network/access/qnetworkaccessftpbackend.cpp index d242bdba82..6d1ee645fe 100644 --- a/src/network/access/qnetworkaccessftpbackend.cpp +++ b/src/network/access/qnetworkaccessftpbackend.cpp @@ -114,7 +114,7 @@ QNetworkAccessFtpBackend::~QNetworkAccessFtpBackend() //if backend destroyed while in use, then abort (this is the code path from QNetworkReply::abort) if (ftp && state != Disconnecting) ftp->abort(); - disconnectFromFtp(); + disconnectFromFtp(RemoveCachedConnection); } void QNetworkAccessFtpBackend::open() diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 018586f9dc..d57acc2f6b 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -739,7 +739,7 @@ bool QNetworkAccessManager::isStrictTransportSecurityEnabled() const \note While processing HTTP responses, QNetworkAccessManager can also update the HSTS cache, removing or updating exitsting policies or introducing new - known hosts. The current implementation thus is server-driven, client code + \a knownHosts. The current implementation thus is server-driven, client code can provide QNetworkAccessManager with previously known or discovered policies, but this information can be overridden by "Strict-Transport-Security" response headers. @@ -1045,7 +1045,7 @@ QNetworkAccessManager::NetworkAccessibility QNetworkAccessManager::networkAccess { Q_D(const QNetworkAccessManager); - if (d->networkConfiguration.state().testFlag(QNetworkConfiguration::Undefined)) + if (d->customNetworkConfiguration && d->networkConfiguration.state().testFlag(QNetworkConfiguration::Undefined)) return UnknownAccessibility; if (d->networkSessionRequired) { @@ -1841,6 +1841,7 @@ void QNetworkAccessManagerPrivate::_q_networkSessionStateChanged(QNetworkSession } else if (state == QNetworkSession::Connected || state == QNetworkSession::Roaming) { reallyOnline = true; } + online = reallyOnline; if (!reallyOnline) { if (state != QNetworkSession::Connected && state != QNetworkSession::Roaming) { @@ -1856,7 +1857,6 @@ void QNetworkAccessManagerPrivate::_q_networkSessionStateChanged(QNetworkSession emit q->networkAccessibleChanged(networkAccessible); } } - online = reallyOnline; if (online && (state != QNetworkSession::Connected && state != QNetworkSession::Roaming)) { _q_networkSessionClosed(); createSession(q->configuration()); diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp index bdb23ede1d..fec3b0a100 100644 --- a/src/network/access/qnetworkreplyhttpimpl.cpp +++ b/src/network/access/qnetworkreplyhttpimpl.cpp @@ -1883,6 +1883,12 @@ void QNetworkReplyHttpImplPrivate::_q_cacheLoadReadyRead() totalSize.isNull() ? Q_INT64_C(-1) : totalSize.toLongLong()); } } + + // A signal we've emitted might be handled by a slot that aborts, + // so we need to check for that and bail out if it's happened: + if (!q->isOpen()) + return; + // If there are still bytes available in the cacheLoadDevice then the user did not read // in response to the readyRead() signal. This means we have to load from the cacheLoadDevice // and buffer that stuff. This is needed to be able to properly emit finished() later. diff --git a/src/network/ssl/qsslellipticcurve.h b/src/network/ssl/qsslellipticcurve.h index 0e7cc60e31..231566063e 100644 --- a/src/network/ssl/qsslellipticcurve.h +++ b/src/network/ssl/qsslellipticcurve.h @@ -64,8 +64,8 @@ public: Q_NETWORK_EXPORT static QSslEllipticCurve fromShortName(const QString &name); Q_NETWORK_EXPORT static QSslEllipticCurve fromLongName(const QString &name); - Q_NETWORK_EXPORT QString shortName() const Q_REQUIRED_RESULT; - Q_NETWORK_EXPORT QString longName() const Q_REQUIRED_RESULT; + Q_REQUIRED_RESULT Q_NETWORK_EXPORT QString shortName() const; + Q_REQUIRED_RESULT Q_NETWORK_EXPORT QString longName() const; Q_DECL_CONSTEXPR bool isValid() const Q_DECL_NOTHROW { |