Skip to content

Commit 944cb8c

Browse files
committed
Revert unused changes to QgsDataItem
1 parent 9a8adfc commit 944cb8c

File tree

3 files changed

+1
-15
lines changed

3 files changed

+1
-15
lines changed

python/core/qgsdataitem.sip

-2
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,6 @@ Create path component replacing path separators
257257
:rtype: str
258258
%End
259259

260-
void setActions( QList<QAction *> actions );
261-
262260
static void deleteLater( QVector<QgsDataItem *> &items );
263261

264262
void moveToThread( QThread *targetThread );

src/app/geocms/geonode/qgsgeonodedataitems.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,6 @@ QVector<QgsDataItem *> QgsGeoNodeServiceItem::createChildren()
178178
skipProvider = true;
179179
}
180180

181-
// add new action menus to the layer item
182-
QList<QAction *> actions;
183-
#if 0
184-
QAction *actionCopyStyle = new QAction( tr( "Copy Style" ), this );
185-
QAction *actionPasteStyle = new QAction( tr( "Paste Style" ), this );
186-
actions << actionCopyStyle << actionPasteStyle;
187-
#endif
188-
189181
Q_FOREACH ( QgsDataItem *item, serviceItems.keys() )
190182
{
191183
QString providerKey = serviceItems.value( item );
@@ -200,7 +192,6 @@ QVector<QgsDataItem *> QgsGeoNodeServiceItem::createChildren()
200192
item->removeChildItem( subItem );
201193
subItem->setParent( this );
202194
replacePath( subItem, providerKey.toLower() + QStringLiteral( ":/" ), pathPrefix );
203-
subItem->setActions( actions );
204195
children.append( subItem );
205196
}
206197

src/core/qgsdataitem.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class CORE_EXPORT QgsDataItem : public QObject
141141
/** Returns the list of actions available for this item. This is usually used for the popup menu on right-clicking
142142
* the item. Subclasses should override this to provide actions.
143143
*/
144-
virtual QList<QAction *> actions() { return mActions; }
144+
virtual QList<QAction *> actions() { return QList<QAction *>(); }
145145

146146
/** Returns whether the item accepts drag and dropped layers - e.g. for importing a dataset to a provider.
147147
* Subclasses should override this and handleDrop() to accept dropped layers.
@@ -228,8 +228,6 @@ class CORE_EXPORT QgsDataItem : public QObject
228228
void setToolTip( const QString &msg ) { mToolTip = msg; }
229229
QString toolTip() const { return mToolTip; }
230230

231-
void setActions( QList<QAction *> actions ) { mActions = actions; }
232-
233231
// deleteLater() items anc clear the vector
234232
static void deleteLater( QVector<QgsDataItem *> &items );
235233

@@ -267,7 +265,6 @@ class CORE_EXPORT QgsDataItem : public QObject
267265
QString mIconName;
268266
QIcon mIcon;
269267
QMap<QString, QIcon> mIconMap;
270-
QList<QAction *> mActions;
271268

272269
public slots:
273270

0 commit comments

Comments
 (0)