We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
2 parents bb36fa7 + 2523d73 commit a22e565Copy full SHA for a22e565
src/core/qgsvectorlayer.cpp
@@ -1530,12 +1530,8 @@ bool QgsVectorLayer::setDataProvider( QString const &provider )
1530
dataSource = uri.uri( false );
1531
}
1532
1533
- // XXX when execution gets here.
1534
-
1535
- //XXX - This was a dynamic cast but that kills the Windows
1536
- // version big-time with an abnormal termination error
1537
delete mDataProvider;
1538
- mDataProvider = ( QgsVectorDataProvider * )( QgsProviderRegistry::instance()->createProvider( provider, dataSource ) );
+ mDataProvider = qobject_cast<QgsVectorDataProvider *>( QgsProviderRegistry::instance()->createProvider( provider, dataSource ) );
1539
if ( !mDataProvider )
1540
{
1541
QgsDebugMsg( " unable to get data provider" );
0 commit comments