From 6d18e4a2b8d82519df177bff5a86a8eca5dae9e6 Mon Sep 17 00:00:00 2001 From: Alexander Akulich Date: Fri, 7 Feb 2020 16:43:07 +0300 Subject: Revert "QAbstractSocket: deprecate 'error' member-function" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 94b3dd77f29a00ebbd1efdc66d75f57e1c75b152. The patch fixes ambiguity between a getter and a signal by changing the getter name, but we still have to rename the signal to follow the signals naming convention. Revert the commit to keep the getter as is and change the signal name instead. Change-Id: I0dd60cf1ae9d1bd95beeb8ad58661ca4b1fb63b9 Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Thiago Macieira --- .../network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/network/socket/qsocks5socketengine') diff --git a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp index da9cdee691..44b5a02af4 100644 --- a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp +++ b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp @@ -288,7 +288,7 @@ void tst_QSocks5SocketEngine::errorTest() QTestEventLoop::instance().enterLoop(10); QVERIFY(!QTestEventLoop::instance().timeout()); - QCOMPARE(int(socket.socketError()), expectedError); + QCOMPARE(int(socket.error()), expectedError); } //--------------------------------------------------------------------------- @@ -1011,7 +1011,7 @@ void tst_QSocks5SocketEngine::incomplete() QTestEventLoop::instance().enterLoop(70); QVERIFY(!QTestEventLoop::instance().timeout()); - QCOMPARE(socket.socketError(), QAbstractSocket::ProxyConnectionClosedError); + QCOMPARE(socket.error(), QAbstractSocket::ProxyConnectionClosedError); } //---------------------------------------------------------------------------------- -- cgit v1.2.3 From cb26a4da69db434d4227bc16e41187f3db93c984 Mon Sep 17 00:00:00 2001 From: Alexander Akulich Date: Fri, 7 Feb 2020 17:29:33 +0300 Subject: QAbstractSocket: deprecate 'error' signal, use 'errorOccurred' instead [ChangeLog][Deprecation Notice] QAbstractSocket::error() (the signal) is deprecated; superseded by errorOccurred() Change-Id: I11e9c774d7c6096d1e9b37c451cf0b99188b6aad Reviewed-by: Timur Pocheptsov --- .../network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/auto/network/socket/qsocks5socketengine') diff --git a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp index 44b5a02af4..85eec6e783 100644 --- a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp +++ b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp @@ -283,7 +283,7 @@ void tst_QSocks5SocketEngine::errorTest() socket.setProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, hostname, port, username, username)); socket.connectToHost("0.1.2.3", 12345); - connect(&socket, SIGNAL(error(QAbstractSocket::SocketError)), + connect(&socket, SIGNAL(errorOccurred(QAbstractSocket::SocketError)), &QTestEventLoop::instance(), SLOT(exitLoop())); QTestEventLoop::instance().enterLoop(10); QVERIFY(!QTestEventLoop::instance().timeout()); @@ -753,7 +753,7 @@ void tst_QSocks5SocketEngine::downloadBigFile() QTestEventLoop::instance().exitLoop(); }); - connect(&socket, QOverload::of(&QAbstractSocket::error), + connect(&socket, &QAbstractSocket::errorOccurred, [&socket, &stopWatch] (QAbstractSocket::SocketError errorCode) { qWarning().noquote().nospace() << QTest::currentTestFunction() @@ -1006,7 +1006,7 @@ void tst_QSocks5SocketEngine::incomplete() connect(&socket, SIGNAL(connected()), &QTestEventLoop::instance(), SLOT(exitLoop())); - connect(&socket, SIGNAL(error(QAbstractSocket::SocketError)), + connect(&socket, SIGNAL(errorOccurred(QAbstractSocket::SocketError)), &QTestEventLoop::instance(), SLOT(exitLoop())); QTestEventLoop::instance().enterLoop(70); QVERIFY(!QTestEventLoop::instance().timeout()); -- cgit v1.2.3