summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2020-01-09 11:58:34 +0100
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2020-01-10 12:54:53 +0100
commit94b3dd77f29a00ebbd1efdc66d75f57e1c75b152 (patch)
treeb95a984789b506b6a0e4df03648717e20282d2e2 /tests/auto/other
parent9a112bebe56f5975bdb11549c8d66773cf60419f (diff)
QAbstractSocket: deprecate 'error' member-function
The one that is a getter for the last error found. This is to disambiguate the expression '&QAbstractSocket::error'. Introduce a new member-function socketError as a replacement. [ChangeLog][Deprecation Notice] QAbstractSocket::error() (the getter) is deprecated; superseded by socketError(). Task-number: QTBUG-80369 Change-Id: Ia2e3d108657aaa7929ab0810babe2ede309740ba Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/auto/other')
-rw-r--r--tests/auto/other/networkselftest/tst_networkselftest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/other/networkselftest/tst_networkselftest.cpp b/tests/auto/other/networkselftest/tst_networkselftest.cpp
index 396e23da0c..0f50718328 100644
--- a/tests/auto/other/networkselftest/tst_networkselftest.cpp
+++ b/tests/auto/other/networkselftest/tst_networkselftest.cpp
@@ -428,7 +428,7 @@ void tst_NetworkSelfTest::serverReachability()
QVERIFY2(timer.elapsed() < 9900, "Connection to closed port timed out instead of refusing, something is wrong");
QVERIFY2(socket.state() == QAbstractSocket::UnconnectedState, "Socket connected unexpectedly!");
- QVERIFY2(socket.error() == QAbstractSocket::ConnectionRefusedError,
+ QVERIFY2(socket.socketError() == QAbstractSocket::ConnectionRefusedError,
QString("Could not reach server: %1").arg(socket.errorString()).toLocal8Bit());
}
@@ -458,7 +458,7 @@ void tst_NetworkSelfTest::remotePortsOpen()
socket.connectToHost(QtNetworkSettings::serverName(), portNumber);
if (!socket.waitForConnected(10000)) {
- if (socket.error() == QAbstractSocket::SocketTimeoutError)
+ if (socket.socketError() == QAbstractSocket::SocketTimeoutError)
QFAIL(QString("Network timeout connecting to the server on port %1").arg(portNumber).toLocal8Bit());
else
QFAIL(QString("Error connecting to server on port %1: %2").arg(portNumber).arg(socket.errorString()).toLocal8Bit());