Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Revert unused changes to QgsDataItem
  • Loading branch information
nyalldawson committed Sep 12, 2017
1 parent 9a8adfc commit 944cb8c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
2 changes: 0 additions & 2 deletions python/core/qgsdataitem.sip
Expand Up @@ -257,8 +257,6 @@ Create path component replacing path separators
:rtype: str
%End

void setActions( QList<QAction *> actions );

static void deleteLater( QVector<QgsDataItem *> &items );

void moveToThread( QThread *targetThread );
Expand Down
9 changes: 0 additions & 9 deletions src/app/geocms/geonode/qgsgeonodedataitems.cpp
Expand Up @@ -178,14 +178,6 @@ QVector<QgsDataItem *> QgsGeoNodeServiceItem::createChildren()
skipProvider = true;
}

// add new action menus to the layer item
QList<QAction *> actions;
#if 0
QAction *actionCopyStyle = new QAction( tr( "Copy Style" ), this );
QAction *actionPasteStyle = new QAction( tr( "Paste Style" ), this );
actions << actionCopyStyle << actionPasteStyle;
#endif

Q_FOREACH ( QgsDataItem *item, serviceItems.keys() )
{
QString providerKey = serviceItems.value( item );
Expand All @@ -200,7 +192,6 @@ QVector<QgsDataItem *> QgsGeoNodeServiceItem::createChildren()
item->removeChildItem( subItem );
subItem->setParent( this );
replacePath( subItem, providerKey.toLower() + QStringLiteral( ":/" ), pathPrefix );
subItem->setActions( actions );
children.append( subItem );
}

Expand Down
5 changes: 1 addition & 4 deletions src/core/qgsdataitem.h
Expand Up @@ -141,7 +141,7 @@ class CORE_EXPORT QgsDataItem : public QObject
/** Returns the list of actions available for this item. This is usually used for the popup menu on right-clicking
* the item. Subclasses should override this to provide actions.
*/
virtual QList<QAction *> actions() { return mActions; }
virtual QList<QAction *> actions() { return QList<QAction *>(); }

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

void setActions( QList<QAction *> actions ) { mActions = actions; }

// deleteLater() items anc clear the vector
static void deleteLater( QVector<QgsDataItem *> &items );

Expand Down Expand Up @@ -267,7 +265,6 @@ class CORE_EXPORT QgsDataItem : public QObject
QString mIconName;
QIcon mIcon;
QMap<QString, QIcon> mIconMap;
QList<QAction *> mActions;

public slots:

Expand Down

0 comments on commit 944cb8c

Please sign in to comment.