Skip to content

Commit

Permalink
Revert "fix TestQgsHttpheaders::createQgsOwsConnection to work with Q…
Browse files Browse the repository at this point in the history
…T 5 and 6"

This reverts commit 762ade6.
  • Loading branch information
cioddi committed Jan 4, 2025
1 parent 762ade6 commit 744c33f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/src/core/testqgshttpheaders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,9 @@ void TestQgsHttpheaders::createQgsOwsConnection()
QgsHttpHeaders h( QVariantMap( { { QgsHttpHeaders::KEY_REFERER, "http://test.com" }, { "other_http_header", "value" } } ) );
QgsOwsConnection::settingsHeaders->setValue( h.headers(), { "service", "name" } );

// for different Versions of QT (5, 6) QUrlQuery produces either "url" or "url="
QUrlQuery testUrlParam;
testUrlParam.addQueryItem( QStringLiteral( "url" ), "" );

QgsOwsConnection ows( "service", "name" );
QCOMPARE( ows.connectionInfo(), ",authcfg=,referer=http://test.com" );
QCOMPARE( ows.uri().encodedUri(), testUrlParam.toString() + "&http-header:other_http_header=value&http-header:referer=http://test.com" );
QCOMPARE( ows.uri().encodedUri(), "url&http-header:other_http_header=value&http-header:referer=http://test.com" );

QgsDataSourceUri uri( QString( "https://www.ogc.org/?p1=v1" ) );
QgsDataSourceUri uri2 = ows.addWmsWcsConnectionSettings( uri, "service", "name" );
Expand Down

0 comments on commit 744c33f

Please sign in to comment.