Skip to content

Commit

Permalink
Fix case of spatialite provider name
Browse files Browse the repository at this point in the history
Breaks adding spatialite layers through the browser
  • Loading branch information
nyalldawson committed Mar 16, 2020
1 parent b16360d commit 2b88519
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/gui/qgsnewdatabasetablenamewidget.cpp
Expand Up @@ -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,
Expand Down
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/providers/spatialite/qgsspatialitedataitems.cpp
Expand Up @@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -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" );
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2b88519

Please sign in to comment.