diff options
author | Alex Trotsenko <alex1973tr@gmail.com> | 2021-07-23 20:01:29 +0300 |
---|---|---|
committer | Alex Trotsenko <alex1973tr@gmail.com> | 2021-07-24 21:46:44 +0300 |
commit | f18d8fd1fb405d2cefea298e2383e5a2e76fcd7a (patch) | |
tree | 70544d3d816738f1aba04bbf320939536d51be3d /tests/auto/network | |
parent | 6481733d45805ecbe22a0806923ee2e0894ecc28 (diff) |
QLocalSocket/Win: do not close the device on disconnectFromServer()
It's the user's privilege to do so when they want to finish reading the
QIODevice. Moreover, this is the only difference between close() and
disconnectFromServer().
[ChangeLog][QtNetwork][Important Behavior Changes] The Windows
implementation of QLocalSocket::disconnectFromServer() no longer calls
close(), which is consistent with the behavior on Unix.
Change-Id: Ie9ce20c60259a2b08f5254b719355bd7be9b17cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Diffstat (limited to 'tests/auto/network')
-rw-r--r-- | tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | 4 | ||||
-rw-r--r-- | tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index 308b2a70d1..261e738955 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -4604,10 +4604,6 @@ void tst_QNetworkReply::ioPutToFileFromLocalSocket() QNetworkReplyPtr reply(manager.put(QNetworkRequest(url), passive)); passive->setParent(reply.data()); -#ifdef Q_OS_WIN - if (!data.isEmpty()) - QEXPECT_FAIL("", "QTBUG-18385", Abort); -#endif QVERIFY2(waitForFinish(reply) == Success, msgWaitForFinished(reply)); QCOMPARE(reply->error(), QNetworkReply::NoError); diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp index 74132416b7..83cecdda6b 100644 --- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp @@ -1369,6 +1369,7 @@ void tst_QLocalSocket::delayedDisconnect() QCOMPARE(socket.state(), QLocalSocket::ClosingState); QVERIFY(socket.waitForDisconnected(3000)); QCOMPARE(socket.state(), QLocalSocket::UnconnectedState); + QVERIFY(socket.isOpen()); } void tst_QLocalSocket::removeServer() |