Skip to content
Permalink
Browse files

remove get from QgsProviderRegistry::getProviderCapabilities() (follo…

…wup 2e943c9)
  • Loading branch information
jef-n committed Oct 14, 2014
1 parent e0df5d4 commit 2cef8d50f2cf1cb53b33b75bc57d137b331bbf20
@@ -43,7 +43,7 @@ class QgsProviderRegistry
@param providerKey identificator of the provider
@note Added in 2.6
*/
int getProviderCapabilities( const QString& providerKey ) const;
int providerCapabilities( const QString& providerKey ) const;

QWidget *selectWidget( const QString & providerKey,
QWidget * parent = 0, Qt::WindowFlags fl = 0 );
@@ -97,7 +97,7 @@ QgsHandleBadLayers::QgsHandleBadLayers( const QList<QDomNode> &layers, const QDo
QString datasource = node.namedItem( "datasource" ).toElement().text();
QString provider = node.namedItem( "provider" ).toElement().text();
QString vectorProvider = type == "vector" ? provider : tr( "none" );
bool providerFileBased = ( QgsProviderRegistry::instance()->getProviderCapabilities( provider ) & QgsDataProvider::File ) != 0;
bool providerFileBased = ( QgsProviderRegistry::instance()->providerCapabilities( provider ) & QgsDataProvider::File ) != 0;

QgsDebugMsg( QString( "name=%1 type=%2 provider=%3 datasource='%4'" )
.arg( name )
@@ -371,18 +371,20 @@ QgsDataProvider *QgsProviderRegistry::provider( QString const & providerKey, QSt
return dataProvider;
} // QgsProviderRegistry::setDataProvider

int QgsProviderRegistry::getProviderCapabilities( const QString &providerKey ) const
int QgsProviderRegistry::providerCapabilities( const QString &providerKey ) const
{
QLibrary *library = providerLibrary( providerKey );
if ( !library )
{
return QgsDataProvider::NoDataCapabilities;
}

dataCapabilities_t * dataCapabilities = ( dataCapabilities_t * ) cast_to_fptr( library->resolve( "dataCapabilities" ) );
if ( !dataCapabilities )
{
return QgsDataProvider::NoDataCapabilities;
}

return dataCapabilities();
}

@@ -489,12 +491,3 @@ const QgsProviderMetadata* QgsProviderRegistry::providerMetadata( const QString&
{
return findMetadata_( mProviders, providerKey );
}


#if 0
QgsDataProvider *
QgsProviderRegistry::openVector( QString const & dataSource, QString const & providerKey )
{
return getProvider( providerKey, dataSource );
} // QgsProviderRegistry::openVector
#endif
@@ -72,7 +72,7 @@ class CORE_EXPORT QgsProviderRegistry
@param providerKey identificator of the provider
@note Added in 2.6
*/
int getProviderCapabilities( const QString& providerKey ) const;
int providerCapabilities( const QString& providerKey ) const;

QWidget *selectWidget( const QString & providerKey,
QWidget * parent = 0, Qt::WindowFlags fl = 0 );

0 comments on commit 2cef8d5

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