Skip to content

Commit b1794ee

Browse files
committedJun 29, 2019
[ows] Remove dead GUI-related data items code
1 parent 58a01ba commit b1794ee

File tree

2 files changed

+0
-107
lines changed

2 files changed

+0
-107
lines changed
 

‎src/providers/ows/qgsowsdataitems.cpp

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
#include "qgsowsconnection.h"
2121
#include "qgsdataitemprovider.h"
2222

23-
#ifdef HAVE_GUI
24-
#include "qgsnewhttpconnection.h"
25-
#endif
26-
2723
#include "qgsapplication.h"
2824

2925
#include <QFileInfo>
@@ -141,45 +137,6 @@ bool QgsOWSConnectionItem::equal( const QgsDataItem *other )
141137
return ( o && mPath == o->mPath && mName == o->mName );
142138
}
143139

144-
#ifdef HAVE_GUI
145-
QList<QAction *> QgsOWSConnectionItem::actions( QWidget *parent )
146-
{
147-
QList<QAction *> lst;
148-
149-
QAction *actionEdit = new QAction( tr( "Edit…" ), parent );
150-
connect( actionEdit, &QAction::triggered, this, &QgsOWSConnectionItem::editConnection );
151-
lst.append( actionEdit );
152-
153-
QAction *actionDelete = new QAction( tr( "Delete" ), parent );
154-
connect( actionDelete, &QAction::triggered, this, &QgsOWSConnectionItem::deleteConnection );
155-
lst.append( actionDelete );
156-
157-
return lst;
158-
}
159-
160-
void QgsOWSConnectionItem::editConnection()
161-
{
162-
#if 0
163-
QgsNewHttpConnection nc( 0, "qgis/connections-ows/", mName );
164-
165-
if ( nc.exec() )
166-
{
167-
// the parent should be updated
168-
mParent->refreshConnections();
169-
}
170-
#endif
171-
}
172-
173-
void QgsOWSConnectionItem::deleteConnection()
174-
{
175-
#if 0
176-
QgsOWSConnection::deleteConnection( "OWS", mName );
177-
// the parent should be updated
178-
mParent->refreshConnections();
179-
#endif
180-
}
181-
#endif
182-
183140

184141
// ---------------------------------------------------------------------------
185142

@@ -216,49 +173,6 @@ QVector<QgsDataItem *> QgsOWSRootItem::createChildren()
216173
return connections;
217174
}
218175

219-
#ifdef HAVE_GUI
220-
QList<QAction *> QgsOWSRootItem::actions( QWidget *parent )
221-
{
222-
Q_UNUSED( parent )
223-
QList<QAction *> lst;
224-
225-
#if 0
226-
QAction *actionNew = new QAction( tr( "New Connection…" ), parent );
227-
connect( actionNew, SIGNAL( triggered() ), this, SLOT( newConnection() ) );
228-
lst.append( actionNew );
229-
#endif
230-
231-
return lst;
232-
}
233-
234-
235-
QWidget *QgsOWSRootItem::paramWidget()
236-
{
237-
#if 0
238-
QgsOWSSourceSelect *select = new QgsOWSSourceSelect( 0, 0, true, true );
239-
connect( select, SIGNAL( connectionsChanged() ), this, SLOT( connectionsChanged() ) );
240-
return select;
241-
#endif
242-
return nullptr;
243-
}
244-
void QgsOWSRootItem::onConnectionsChanged()
245-
{
246-
refresh();
247-
}
248-
249-
void QgsOWSRootItem::newConnection()
250-
{
251-
#if 0
252-
QgsNewHttpConnection nc( 0, "qgis/connections-ows/" );
253-
254-
if ( nc.exec() )
255-
{
256-
refreshConnections();
257-
}
258-
#endif
259-
}
260-
#endif
261-
262176

263177
// ---------------------------------------------------------------------------
264178

‎src/providers/ows/qgsowsdataitems.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,6 @@ class QgsOWSConnectionItem : public QgsDataCollectionItem
2929
QVector<QgsDataItem *> createChildren() override;
3030
bool equal( const QgsDataItem *other ) override;
3131

32-
#ifdef HAVE_GUI
33-
QList<QAction *> actions( QWidget *parent ) override;
34-
#endif
35-
36-
public slots:
37-
#ifdef HAVE_GUI
38-
void editConnection();
39-
void deleteConnection();
40-
#endif
41-
4232
private:
4333
void replacePath( QgsDataItem *item, QString before, QString after );
4434
};
@@ -53,17 +43,6 @@ class QgsOWSRootItem : public QgsDataCollectionItem
5343

5444
QVariant sortKey() const override { return 11; }
5545

56-
#ifdef HAVE_GUI
57-
QList<QAction *> actions( QWidget *parent ) override;
58-
QWidget *paramWidget() override;
59-
#endif
60-
61-
public slots:
62-
#ifdef HAVE_GUI
63-
void onConnectionsChanged();
64-
65-
void newConnection();
66-
#endif
6746
};
6847

6948
//! Provider for OWS data item

0 commit comments

Comments
 (0)
Please sign in to comment.