Skip to content

Commit

Permalink
Revert redundant changes to ows provider
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 12, 2017
1 parent b657c1a commit 5f82705
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 23 deletions.
1 change: 0 additions & 1 deletion src/providers/ows/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ ADD_LIBRARY (owsprovider MODULE ${OWS_SRCS} ${OWS_MOC_SRCS})

TARGET_LINK_LIBRARIES (owsprovider
qgis_core
qgis_gui
)

IF (WITH_GUI)
Expand Down
21 changes: 13 additions & 8 deletions src/providers/ows/qgsowsdataitems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,21 +259,26 @@ void QgsOWSRootItem::newConnection()
static QStringList extensions = QStringList();
static QStringList wildcards = QStringList();

QGISEXTERN QList<QgsDataItemProvider *> *dataItemProviders()
QGISEXTERN int dataCapabilities()
{
QList<QgsDataItemProvider *> *providers = new QList<QgsDataItemProvider *>();

*providers
<< new QgsOwsDataItemProvider;

return providers;
return QgsDataProvider::Net;
}

QgsDataItem *QgsOwsDataItemProvider::createDataItem( const QString &path, QgsDataItem *parentItem )
QGISEXTERN QgsDataItem *dataItem( QString path, QgsDataItem *parentItem )
{
if ( path.isEmpty() )
{
return new QgsOWSRootItem( parentItem, QStringLiteral( "OWS" ), QStringLiteral( "ows:" ) );
}
return nullptr;
}

//QGISEXTERN QgsOWSSourceSelect * selectWidget( QWidget * parent, Qt::WindowFlags fl )
QGISEXTERN QDialog *selectWidget( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode widgetMode )
{
Q_UNUSED( parent );
Q_UNUSED( fl );
Q_UNUSED( widgetMode );
//return new QgsOWSSourceSelect( parent, fl, widgetMode );
return nullptr;
}
14 changes: 0 additions & 14 deletions src/providers/ows/qgsowsdataitems.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
#define QGSOWSDATAITEMS_H

#include "qgsdataitem.h"
#include "qgsdataitemprovider.h"
#include "qgsdataprovider.h"
#include "qgsdatasourceuri.h"

class QgsOWSConnectionItem : public QgsDataCollectionItem
{
Q_OBJECT
Expand Down Expand Up @@ -66,15 +63,4 @@ class QgsOWSRootItem : public QgsDataCollectionItem
#endif
};

//! Provider for ows root data item
class QgsOwsDataItemProvider : public QgsDataItemProvider
{
public:
virtual QString name() override { return QStringLiteral( "OWS" ); }

virtual int capabilities() override { return QgsDataProvider::Net; }

virtual QgsDataItem *createDataItem( const QString &path, QgsDataItem *parentItem ) override;
};

#endif // QGSOWSDATAITEMS_H

0 comments on commit 5f82705

Please sign in to comment.