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/socket | |
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/socket')
-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 |
3 files changed, 9 insertions, 3 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 |