Skip to content
Permalink
Browse files

Fix duplicate WFS item in browser (fixes #17176)

  • Loading branch information
nyalldawson committed Oct 3, 2017
1 parent 8a09a19 commit 8d6f4467a2baa6e8af7b5cab895a9d00c7c205ca
Showing with 0 additions and 27 deletions.
  1. +0 −27 src/providers/wfs/qgswfsdataitems.cpp
@@ -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 *>();

0 comments on commit 8d6f446

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