Skip to content

Commit 754b2e7

Browse files
committedFeb 12, 2019
adapted to 3.4 API
1 parent 6d5d7c5 commit 754b2e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/core/qgsmaplayer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,17 +1483,17 @@ QString QgsMapLayer::saveSldStyle( const QString &uri, bool &resultFlag ) const
14831483
// check if the uri is a file or ends with .sld,
14841484
// which indicates that it should become one
14851485
QString filename;
1486-
if ( mlayer->providerType() == QLatin1String( "ogr" ) )
1486+
if ( mlayer->dataProvider()->name() == QLatin1String( "ogr" ) )
14871487
{
14881488
QStringList theURIParts = uri.split( '|' );
14891489
filename = theURIParts[0];
14901490
}
1491-
else if ( mlayer->providerType() == QLatin1String( "gpx" ) )
1491+
else if ( mlayer->dataProvider()->name() == QLatin1String( "gpx" ) )
14921492
{
14931493
QStringList theURIParts = uri.split( '?' );
14941494
filename = theURIParts[0];
14951495
}
1496-
else if ( mlayer->providerType() == QLatin1String( "delimitedtext" ) )
1496+
else if ( mlayer->dataProvider()->name() == QLatin1String( "delimitedtext" ) )
14971497
{
14981498
filename = QUrl::fromEncoded( uri.toLatin1() ).toLocalFile();
14991499
// toLocalFile() returns an empty string if theURI is a plain Windows-path, e.g. "C:/style.qml"

0 commit comments

Comments
 (0)
Please sign in to comment.