Skip to content
Permalink
Browse files

Fix case of spatialite provider name

Breaks adding spatialite layers through the browser
  • Loading branch information
nyalldawson committed Mar 16, 2020
1 parent b16360d commit 2b88519b430a732abb072b6b49ee2eee69d3e043
@@ -28,7 +28,7 @@
#include <QPushButton>

// List of data item provider keys that are filesystem based
QStringList QgsNewDatabaseTableNameWidget::FILESYSTEM_BASED_DATAITEM_PROVIDERS { QStringLiteral( "GPKG" ), QStringLiteral( "SPATIALITE" ) };
QStringList QgsNewDatabaseTableNameWidget::FILESYSTEM_BASED_DATAITEM_PROVIDERS { QStringLiteral( "GPKG" ), QStringLiteral( "spatialite" ) };

QgsNewDatabaseTableNameWidget::QgsNewDatabaseTableNameWidget(
QgsBrowserGuiModel *browserModel,
@@ -26,7 +26,7 @@ class QgsSpatiaLiteDataItemGuiProvider : public QObject, public QgsDataItemGuiPr
Q_OBJECT
public:

QString name() override { return QStringLiteral( "SPATIALITE" ); }
QString name() override { return QStringLiteral( "spatialite" ); }

void populateContextMenu( QgsDataItem *item, QMenu *menu,
const QList<QgsDataItem *> &selectedItems, QgsDataItemGuiContext context ) override;
@@ -61,7 +61,7 @@ bool SpatiaLiteUtils::deleteLayer( const QString &dbPath, const QString &tableNa
}

QgsSLLayerItem::QgsSLLayerItem( QgsDataItem *parent, const QString &name, const QString &path, const QString &uri, LayerType layerType )
: QgsLayerItem( parent, name, path, uri, layerType, QStringLiteral( "SPATIALITE" ) )
: QgsLayerItem( parent, name, path, uri, layerType, QStringLiteral( "spatialite" ) )
{
mCapabilities |= Delete;
setState( Populated ); // no children are expected
@@ -70,7 +70,7 @@ QgsSLLayerItem::QgsSLLayerItem( QgsDataItem *parent, const QString &name, const
// ------

QgsSLConnectionItem::QgsSLConnectionItem( QgsDataItem *parent, const QString &name, const QString &path )
: QgsDataCollectionItem( parent, name, path, QStringLiteral( "SPATIALITE" ) )
: QgsDataCollectionItem( parent, name, path, QStringLiteral( "spatialite" ) )
{
mDbPath = QgsSpatiaLiteConnection::connectionPath( name );
mToolTip = mDbPath;
@@ -162,7 +162,7 @@ bool QgsSLConnectionItem::equal( const QgsDataItem *other )
// ---------------------------------------------------------------------------

QgsSLRootItem::QgsSLRootItem( QgsDataItem *parent, const QString &name, const QString &path )
: QgsDataCollectionItem( parent, name, path, QStringLiteral( "SPATIALITE" ) )
: QgsDataCollectionItem( parent, name, path, QStringLiteral( "spatialite" ) )
{
mCapabilities |= Fast;
mIconName = QStringLiteral( "mIconSpatialite.svg" );
@@ -276,7 +276,7 @@ bool SpatiaLiteUtils::createDb( const QString &dbPath, QString &errCause )

QString QgsSpatiaLiteDataItemProvider::name()
{
return QStringLiteral( "SPATIALITE" );
return QStringLiteral( "spatialite" );
}

QString QgsSpatiaLiteDataItemProvider::dataProviderKey() const

0 comments on commit 2b88519

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