Skip to content
Permalink
Browse files

Fix authentication configuration is lost when adding Arcgis Feature S…

…ervice/Map service layers via source select dialog
  • Loading branch information
github-actions authored and nyalldawson committed Nov 6, 2020
1 parent 78b7196 commit 72bb38456af428349b1261eb8f8cb43843a24d1c
@@ -459,7 +459,7 @@ QString QgsAfsProviderMetadata::encodeUri( const QVariantMap &parts )
{
dsUri.setAuthConfigId( parts.value( QStringLiteral( "authcfg" ) ).toString() );
}
return dsUri.uri();
return dsUri.uri( false );
}

QgsAfsProvider *QgsAfsProviderMetadata::createProvider( const QString &uri, const QgsDataProvider::ProviderOptions &options, QgsDataProvider::ReadFlags flags )
@@ -165,7 +165,7 @@ void QgsAfsSourceSelect::buildQuery( const QgsOwsConnection &connection, const Q
ds.removeParam( QStringLiteral( "url" ) );
ds.setParam( QStringLiteral( "url" ), url );
QgsDataProvider::ProviderOptions providerOptions;
QgsAfsProvider provider( ds.uri(), providerOptions );
QgsAfsProvider provider( ds.uri( false ), providerOptions );
if ( !provider.isValid() )
{
return;
@@ -201,7 +201,7 @@ QString QgsAfsSourceSelect::getLayerURI( const QgsOwsConnection &connection,
{
ds.setParam( QStringLiteral( "bbox" ), QStringLiteral( "%1,%2,%3,%4" ).arg( bBox.xMinimum() ).arg( bBox.yMinimum() ).arg( bBox.xMaximum() ).arg( bBox.yMaximum() ) );
}
return ds.uri();
return ds.uri( false );
}


@@ -1271,7 +1271,7 @@ QString QgsAmsProviderMetadata::encodeUri( const QVariantMap &parts )
{
QgsDataSourceUri dsUri;
dsUri.setParam( QStringLiteral( "url" ), parts.value( QStringLiteral( "url" ) ).toString() );
return dsUri.uri();
return dsUri.uri( false );
}

QGISEXTERN QgsProviderMetadata *providerMetadataFactory()
@@ -166,7 +166,7 @@ QString QgsAmsSourceSelect::getLayerURI( const QgsOwsConnection &connection,
ds.setParam( QStringLiteral( "layer" ), layerId );
ds.setParam( QStringLiteral( "crs" ), crs );
ds.setParam( QStringLiteral( "format" ), getSelectedImageEncoding() );
return ds.uri();
return ds.uri( false );
}

void QgsAmsSourceSelect::addServiceLayer( QString uri, QString typeName )

0 comments on commit 72bb384

Please sign in to comment.
You can’t perform that action at this time.