Skip to content
Permalink
Browse files

Merge pull request #8017 from elpaso/geopackage-vacuum-from-file-browser

[browser] Allow GPKG VACUUM from file browser
  • Loading branch information
elpaso committed Sep 25, 2018
2 parents ad94cce + 2df58fd commit 774e7341bbd3f44f65e941c94cdc59a802cf512f
Showing with 7 additions and 2 deletions.
  1. +6 −1 src/providers/ogr/qgsgeopackagedataitems.cpp
  2. +1 −1 src/providers/ogr/qgsgeopackagedataitems.h
@@ -193,6 +193,12 @@ QList<QAction *> QgsGeoPackageCollectionItem::actions( QWidget *parent )
connect( actionAddTable, &QAction::triggered, this, &QgsGeoPackageCollectionItem::addTable );
lst.append( actionAddTable );

// Run VACUUM
QAction *actionVacuumDb = new QAction( tr( "Compact database (VACUUM)" ), parent );
connect( actionVacuumDb, &QAction::triggered, this, &QgsGeoPackageConnectionItem::vacuumGeoPackageDbAction );
lst.append( actionVacuumDb );


return lst;
}

@@ -375,7 +381,6 @@ QList<QAction *> QgsGeoPackageConnectionItem::actions( QWidget *parent )
connect( actionVacuumDb, &QAction::triggered, this, &QgsGeoPackageConnectionItem::vacuumGeoPackageDbAction );
lst.append( actionVacuumDb );


return lst;
}

@@ -37,7 +37,7 @@ class QgsGeoPackageAbstractLayerItem : public QgsLayerItem
*/
virtual bool executeDeleteLayer( QString &errCause );
#ifdef HAVE_GUI
QList<QAction *> actions( QWidget *parent ) override;
QList<QAction *> actions( QWidget *menu ) override;
public slots:
virtual void deleteLayer();
#endif

0 comments on commit 774e734

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