Skip to content

Commit

Permalink
[browser] Allow GPKG VACUUM from file browser
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Sep 25, 2018
1 parent 7466544 commit 2df58fd
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
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
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 2df58fd

Please sign in to comment.