diff options
author | Liang Qi <liang.qi@qt.io> | 2019-05-13 08:04:58 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-05-13 08:04:58 +0200 |
commit | 388fe97f2a54089544dff0ed3af6ca70bf604716 (patch) | |
tree | 163b47974c625849726804337bd667c942dfbc77 /src/network | |
parent | a0c4b6f34546bdd22167a76a0540d37e9a37c0cf (diff) | |
parent | 591116490cf313808e8ba05ddd066656a1d1a566 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
src/corelib/tools/qstring.cpp
Change-Id: I81dbf90fc936c9bf08197baefa071117bddb1c63
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/socket/qlocalserver.cpp | 2 | ||||
-rw-r--r-- | src/network/socket/qnativesocketengine_winrt.cpp | 8 | ||||
-rw-r--r-- | src/network/socket/qtcpserver.cpp | 2 | ||||
-rw-r--r-- | src/network/ssl/qsslcertificate.cpp | 2 | ||||
-rw-r--r-- | src/network/ssl/qsslkey_p.cpp | 4 |
5 files changed, 12 insertions, 6 deletions
diff --git a/src/network/socket/qlocalserver.cpp b/src/network/socket/qlocalserver.cpp index c5bd599a51..3e36a7b229 100644 --- a/src/network/socket/qlocalserver.cpp +++ b/src/network/socket/qlocalserver.cpp @@ -408,7 +408,7 @@ int QLocalServer::maxPendingConnections() const still a good idea to delete the object explicitly when you are done with it, to avoid wasting memory. - 0 is returned if this function is called when there are no pending + \nullptr is returned if this function is called when there are no pending connections. \sa hasPendingConnections(), newConnection(), incomingConnection() diff --git a/src/network/socket/qnativesocketengine_winrt.cpp b/src/network/socket/qnativesocketengine_winrt.cpp index 7ac6297de6..2eb2141fee 100644 --- a/src/network/socket/qnativesocketengine_winrt.cpp +++ b/src/network/socket/qnativesocketengine_winrt.cpp @@ -875,8 +875,14 @@ void QNativeSocketEngine::close() if (d->closingDown) return; - if (d->pendingReadNotification) + if (d->pendingReadNotification) { + // We use QPointer here to see if this QNativeSocketEngine was deleted as a result of + // finishing and cleaning up a network request when calling "processReadReady". + QPointer<QNativeSocketEngine> alive(this); processReadReady(); + if (alive.isNull()) + return; + } d->closingDown = true; diff --git a/src/network/socket/qtcpserver.cpp b/src/network/socket/qtcpserver.cpp index 56c700ca8f..98e58192a2 100644 --- a/src/network/socket/qtcpserver.cpp +++ b/src/network/socket/qtcpserver.cpp @@ -548,7 +548,7 @@ bool QTcpServer::hasPendingConnections() const destroyed. It is still a good idea to delete the object explicitly when you are done with it, to avoid wasting memory. - 0 is returned if this function is called when there are no pending + \nullptr is returned if this function is called when there are no pending connections. \note The returned QTcpSocket object cannot be used from another diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index 0156b5bf96..4820953468 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -417,7 +417,7 @@ QByteArray QSslCertificate::digest(QCryptographicHash::Algorithm algorithm) cons /*! \fn Qt::HANDLE QSslCertificate::handle() const Returns a pointer to the native certificate handle, if there is - one, or a null pointer otherwise. + one, else \nullptr. You can use this handle, together with the native API, to access extended information about the certificate. diff --git a/src/network/ssl/qsslkey_p.cpp b/src/network/ssl/qsslkey_p.cpp index 7d14aacebf..b0d6c729f9 100644 --- a/src/network/ssl/qsslkey_p.cpp +++ b/src/network/ssl/qsslkey_p.cpp @@ -508,8 +508,8 @@ QByteArray QSslKey::toPem(const QByteArray &passPhrase) const } /*! - Returns a pointer to the native key handle, if it is available; - otherwise a null pointer is returned. + Returns a pointer to the native key handle, if there is + one, else \nullptr. You can use this handle together with the native API to access extended information about the key. |