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.
1 parent bb36fa7 commit 2523d73Copy full SHA for 2523d73
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