From b2ad8f05ba744787ff0ac182411a5c7e56af8d33 Mon Sep 17 00:00:00 2001 From: Juha Vuolle Date: Tue, 22 Apr 2025 11:46:31 +0300 Subject: [PATCH] Fix tst_qnetworkreply compilation when networkproxy is disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a feature guard for test function relying on networkproxy. Pick-to: 6.8 Task-number: QTBUG-136101 Change-Id: I69d97c84fb7d68f33f4b74fc8fd6665b1b8d6717 Reviewed-by: MÃ¥rten Nordheim (cherry picked from commit 11b54b85ce74d59173afd297b780d3170b331548) Reviewed-by: Qt Cherry-pick Bot --- .../network/access/qnetworkreply/tst_qnetworkreply.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index d93ee07209c..975cc3beb04 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -593,9 +593,10 @@ private Q_SLOTS: #if QT_CONFIG(http) void qhttpPartDebug_data(); void qhttpPartDebug(); - +#if QT_CONFIG(networkproxy) void qtbug68821proxyError_data(); void qtbug68821proxyError(); +#endif #endif void abortAndError(); @@ -10670,6 +10671,7 @@ void tst_QNetworkReply::qhttpPartDebug() QVERIFY2(msg.contains(value), "Missing header value: " + value); } +#if QT_CONFIG(networkproxy) void tst_QNetworkReply::qtbug68821proxyError_data() { QTest::addColumn("proxyHost"); @@ -10718,7 +10720,8 @@ void tst_QNetworkReply::qtbug68821proxyError() QCOMPARE(spy.count(), 1); QCOMPARE(spy.at(0).at(0), error); } -#endif +#endif // QT_CONFIG(networkproxy) +#endif // QT_CONFIG(http) void tst_QNetworkReply::abortAndError() {