summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/socket/qlocalsocket/socketprocess
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2020-01-07 13:32:02 +0100
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2020-01-10 12:54:53 +0100
commit0de6c26ac17c90f513329fdbe87ef036fc25925a (patch)
tree34073f867f729cc49eed8c20835e188b5083eae8 /tests/auto/network/socket/qlocalsocket/socketprocess
parent94b3dd77f29a00ebbd1efdc66d75f57e1c75b152 (diff)
QLocalSocket - deprecate ambiguous 'error' overloads
QLocalSocket::error is overloaded as a signal and an accessor (for the error reported by the signal). This means connecting to the signal using a pointer to member function would require ambiguity resolution. We deprecate the old accessor (to be removed in Qt 6) and introduce a new one - 'socketError'. [ChangeLog][Deprecation Notice] QLocalSocket::error() (the getter) is deprecated; superseded by socketError(). Task-number: QTBUG-80369 Change-Id: Iab346f7b4cd1024dee9e5ef71b4b7e09f6d95b12 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/auto/network/socket/qlocalsocket/socketprocess')
-rw-r--r--tests/auto/network/socket/qlocalsocket/socketprocess/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/network/socket/qlocalsocket/socketprocess/main.cpp b/tests/auto/network/socket/qlocalsocket/socketprocess/main.cpp
index 272e837ac5..6355fea6ab 100644
--- a/tests/auto/network/socket/qlocalsocket/socketprocess/main.cpp
+++ b/tests/auto/network/socket/qlocalsocket/socketprocess/main.cpp
@@ -65,8 +65,8 @@ bool runServer(int numberOfConnections)
return false;
}
printf("server: data written\n");
- if (socket->error() != QLocalSocket::UnknownSocketError) {
- fprintf(stderr, "server: socket error %d\n", socket->error());
+ if (socket->socketError() != QLocalSocket::UnknownSocketError) {
+ fprintf(stderr, "server: socket error %d\n", socket->socketError());
return false;
}
}
@@ -83,8 +83,8 @@ bool runClient()
socket.connectToServer(serverName, QLocalSocket::ReadWrite);
if (socket.waitForConnected())
break;
- if (socket.error() == QLocalSocket::ServerNotFoundError
- || socket.error() == QLocalSocket::ConnectionRefusedError) {
+ if (socket.socketError() == QLocalSocket::ServerNotFoundError
+ || socket.socketError() == QLocalSocket::ConnectionRefusedError) {
if (connectTimer.elapsed() > 5000) {
fprintf(stderr, "client: server not found or connection refused. Giving up.\n");
return false;