From 17d2550ed09c564977d4e9414f60c5514ce4f76a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 20 Mar 2024 10:33:07 +0100 Subject: [PATCH] tst_QNetworkReply: use QtCore's QScopedPointerDeleteLater MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... instead of rolling your own. Pick-to: 6.7 6.6 6.5 Change-Id: I4fee2218eb874bfee34bd3a0abac3f85b0746540 Reviewed-by: MÃ¥rten Nordheim --- .../access/qnetworkreply/tst_qnetworkreply.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index b3865f499c..51b982d0c8 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -6442,14 +6442,6 @@ struct QThreadCleanup } }; -struct QDeleteLaterCleanup -{ - static inline void cleanup(QObject *o) - { - o->deleteLater(); - } -}; - #if QT_CONFIG(networkproxy) void tst_QNetworkReply::httpProxyCommandsSynchronous() { @@ -6461,7 +6453,7 @@ void tst_QNetworkReply::httpProxyCommandsSynchronous() // the server thread, because the client is never returning to the // event loop QScopedPointer serverThread(new QThread); - QScopedPointer proxyServer(new MiniHttpServer(responseToSend, false, serverThread.data())); + QScopedPointer proxyServer(new MiniHttpServer(responseToSend, false, serverThread.data())); QNetworkProxy proxy(QNetworkProxy::HttpProxy, "127.0.0.1", proxyServer->serverPort()); manager.setProxy(proxy); @@ -8677,7 +8669,7 @@ void tst_QNetworkReply::synchronousAuthenticationCache() // the server thread, because the client is never returning to the // event loop QScopedPointer serverThread(new QThread); - QScopedPointer server(new MiniAuthServer(serverThread.data())); + QScopedPointer server(new MiniAuthServer(serverThread.data())); server->doClose = true; //1) URL without credentials, we are not authenticated