Skip to content

Commit

Permalink
Merge pull request #8017 from elpaso/geopackage-vacuum-from-file-browser
Browse files Browse the repository at this point in the history
[browser] Allow GPKG VACUUM from file browser
  • Loading branch information
elpaso authored Sep 25, 2018
2 parents ad94cce + 2df58fd commit 774e734
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/providers/ogr/qgsgeopackagedataitems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

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


return lst;
}

Expand Down
2 changes: 1 addition & 1 deletion src/providers/ogr/qgsgeopackagedataitems.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 774e734

Please sign in to comment.