Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use data provider to get provider name as providerType() not available
in the LTR branch
  • Loading branch information
alexbruy committed May 27, 2019
1 parent 80cb853 commit a4a57df
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/qgsmaplayer.cpp
Expand Up @@ -803,10 +803,11 @@ QString QgsMapLayer::baseURI( PropertyType type ) const
// as in these cases URI may contain layer name and/or additional
// information. This also strips prefix in case if VSIFILE mechanism
// is used
if ( providerType() == QLatin1String( "ogr" ) || providerType() == QLatin1String( "delimitedtext" ) ||
providerType() == QLatin1String( "spatialite" ) )
QString providerType = dataProvider()->name();
if ( providerType == QLatin1String( "ogr" ) || providerType == QLatin1String( "delimitedtext" ) ||
providerType == QLatin1String( "spatialite" ) )
{
QVariantMap components = QgsProviderRegistry::instance()->decodeUri( providerType(), myURI );
QVariantMap components = QgsProviderRegistry::instance()->decodeUri( providerType, myURI );
myURI = components["path"].toString();
}

Expand Down

0 comments on commit a4a57df

Please sign in to comment.