[BUGFIX] QgsOwsConnection: use dedicated QgsDataSourceUri setters for credentials, so that userName(), etc. work without serializing/deserialing. Neeed with OAPIF source select GUI

This commit is contained in:
Even Rouault 2019-10-13 20:17:24 +02:00 committed by Nyall Dawson
parent 13298bb060
commit 89de7579bf

View File

@ -54,14 +54,14 @@ QgsOwsConnection::QgsOwsConnection( const QString &service, const QString &connN
if ( !username.isEmpty() )
{
// check for a password, if none prompt to get it
mUri.setParam( QStringLiteral( "username" ), username );
mUri.setParam( QStringLiteral( "password" ), password );
mUri.setUsername( username );
mUri.setPassword( password );
}
QString authcfg = settings.value( credentialsKey + "/authcfg" ).toString();
if ( !authcfg.isEmpty() )
{
mUri.setParam( QStringLiteral( "authcfg" ), authcfg );
mUri.setAuthConfigId( authcfg );
}
mConnectionInfo.append( ",authcfg=" + authcfg );