Skip to content
Permalink
Browse files

Fix expose spatialite browser fields

  • Loading branch information
elpaso committed Jul 15, 2020
1 parent bf7d746 commit 7cf61d6de0d067e58bf6a6654b6e69c32b76b9a5
@@ -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 7cf61d6

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