Skip to content
Permalink
Browse files

Modify provider registry to also return invalid providers

  • Loading branch information
mhugent committed Jul 11, 2012
1 parent 3ba646f commit 402bacac73a3d75b76e3650edfd2262cb934e906
Showing with 2 additions and 17 deletions.
  1. +2 −17 src/core/qgsproviderregistry.cpp
@@ -389,23 +389,8 @@ QgsDataProvider *QgsProviderRegistry::provider( QString const & providerKey, QSt
QgsDebugMsg( "Instantiated the data provider plugin" );
QgsDebugMsg( "provider name: " + dataProvider->name() );

if ( dataProvider->isValid() )
{
delete myLib;
return dataProvider;
}
else
{
// this is likely because the dataSource is invalid, and isn't
// necessarily a reflection on the data provider itself
QgsDebugMsg( "Invalid data provider" );

delete dataProvider;

myLib->unload();
delete myLib;
return 0;
}
delete myLib;
return dataProvider;
}
else
{

0 comments on commit 402baca

Please sign in to comment.
You can’t perform that action at this time.