Skip to content

Commit

Permalink
Fix duplicate WFS item in browser (fixes #17176)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 3, 2017
1 parent 8a09a19 commit 8d6f446
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions src/providers/wfs/qgswfsdataitems.cpp
Expand Up @@ -358,33 +358,6 @@ QGISEXTERN QgsWFSSourceSelect *selectWidget( QWidget *parent, Qt::WindowFlags fl
}
#endif

QGISEXTERN int dataCapabilities()
{
return QgsDataProvider::Net;
}

QGISEXTERN QgsDataItem *dataItem( QString path, QgsDataItem *parentItem )
{
QgsDebugMsg( "path = " + path );
if ( path.isEmpty() )
{
return new QgsWfsRootItem( parentItem, QStringLiteral( "WFS" ), QStringLiteral( "wfs:" ) );
}

// path schema: wfs:/connection name (used by OWS)
if ( path.startsWith( QLatin1String( "wfs:/" ) ) )
{
QString connectionName = path.split( '/' ).last();
if ( QgsWfsConnection::connectionList().contains( connectionName ) )
{
QgsWfsConnection connection( connectionName );
return new QgsWfsConnectionItem( parentItem, QStringLiteral( "WFS" ), path, connection.uri().uri() );
}
}

return nullptr;
}

QGISEXTERN QList<QgsDataItemProvider *> *dataItemProviders()
{
QList<QgsDataItemProvider *> *providers = new QList<QgsDataItemProvider *>();
Expand Down

0 comments on commit 8d6f446

Please sign in to comment.