File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -595,6 +595,24 @@ bool QgsGeoPackageRasterLayerItem::executeDeleteLayer( QString &errCause )
595
595
&errmsg /* Error msg written here */
596
596
);
597
597
sqlite3_free ( sql );
598
+ // Remove from optional tables, may silently fail
599
+ for ( const auto tableName : QStringList ()
600
+ << QStringLiteral ( " gpkg_extensions" )
601
+ << QStringLiteral ( " gpkg_metadata" )
602
+ << QStringLiteral ( " gpkg_metadata_reference" ) )
603
+ {
604
+ char *sql = sqlite3_mprintf ( " DELETE FROM table %w WHERE table_name = '%q" ,
605
+ tableName.toUtf8 ().constData (),
606
+ layerName.toUtf8 ().constData () );
607
+ status = sqlite3_exec (
608
+ handle, /* An open database */
609
+ sql, /* SQL to be evaluated */
610
+ NULL , /* Callback function */
611
+ NULL , /* 1st argument to callback */
612
+ NULL /* Error msg written here */
613
+ );
614
+ sqlite3_free ( sql );
615
+ }
598
616
if ( status == SQLITE_OK )
599
617
{
600
618
result = true ;
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ class QgsGeoPackageConnectionItem : public QgsDataCollectionItem
76
76
#ifdef HAVE_GUI
77
77
virtual bool acceptDrop () override { return true ; }
78
78
virtual bool handleDrop ( const QMimeData *data, Qt::DropAction action ) override ;
79
- QList<QAction *> actions ();
79
+ QList<QAction *> actions () override ;
80
80
#endif
81
81
82
82
// ! Return the layer type from \a geometryType
@@ -106,7 +106,7 @@ class QgsGeoPackageRootItem : public QgsDataCollectionItem
106
106
107
107
#ifdef HAVE_GUI
108
108
virtual QWidget *paramWidget () override ;
109
- QList<QAction *> actions ();
109
+ QList<QAction *> actions () override ;
110
110
111
111
public slots:
112
112
void newConnection ();
You can’t perform that action at this time.
0 commit comments