Skip to content
Permalink
Browse files

Revert unused changes to QgsDataItem

  • Loading branch information
nyalldawson committed Sep 10, 2017
1 parent 9a8adfc commit 944cb8c4bd5c52acbe2826756a55296d288e6b36
Showing with 1 addition and 15 deletions.
  1. +0 −2 python/core/qgsdataitem.sip
  2. +0 −9 src/app/geocms/geonode/qgsgeonodedataitems.cpp
  3. +1 −4 src/core/qgsdataitem.h
@@ -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 );
@@ -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 );
@@ -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 );
}

@@ -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.
@@ -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 );

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

public slots:

0 comments on commit 944cb8c

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