Skip to content
Permalink
Browse files

Merge pull request #37820 from elpaso/browser-expose-fields-spatialite

Fix expose spatialite browser fields
  • Loading branch information
elpaso committed Jul 15, 2020
2 parents bf7d746 + 7cf61d6 commit b356d297d9acf2b67c6005849ea791be743dea73
@@ -64,7 +64,7 @@ QgsSLLayerItem::QgsSLLayerItem( QgsDataItem *parent, const QString &name, const
: QgsLayerItem( parent, name, path, uri, layerType, QStringLiteral( "spatialite" ) )
{
mCapabilities |= Delete;
setState( Populated ); // no children are expected
setState( NotPopulated );
}

// ------
@@ -300,3 +300,13 @@ bool QgsSLConnectionItem::layerCollection() const
{
return true;
}

QVector<QgsDataItem *> QgsSLLayerItem::createChildren()
{
QVector<QgsDataItem *> children;
children.push_back( new QgsFieldsItem( this,
path() + QStringLiteral( "/columns/ " ),
uri(),
QStringLiteral( "spatialite" ), QString(), name() ) );
return children;
}
@@ -24,8 +24,12 @@ class QgsSLLayerItem : public QgsLayerItem
public:
QgsSLLayerItem( QgsDataItem *parent, const QString &name, const QString &path, const QString &uri, LayerType layerType );

// QgsDataItem interface
QVector<QgsDataItem *> createChildren() override;
};



class QgsSLConnectionItem : public QgsDataCollectionItem
{
Q_OBJECT

0 comments on commit b356d29

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