Fix slot handling in Photos tab

This clearly has never been tested, never worked.
Oh well.

Fixes #478

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-07-12 08:25:40 -07:00
parent b7b2e813ad
commit 1b8b112048
2 changed files with 6 additions and 5 deletions

View file

@ -43,11 +43,11 @@ void TabDivePhotos::clear()
void TabDivePhotos::contextMenuEvent(QContextMenuEvent *event)
{
QMenu popup(this);
popup.addAction(tr("Load image(s) from file(s)"), this, SLOT(addPhotosFromFile));
popup.addAction(tr("Load image(s) from web"), this, SLOT(addPhotosFromURL));
popup.addAction(tr("Load image(s) from file(s)"), this, SLOT(addPhotosFromFile()));
popup.addAction(tr("Load image(s) from web"), this, SLOT(addPhotosFromURL()));
popup.addSeparator();
popup.addAction(tr("Delete selected images"), this, SLOT(removeSelectedPhotos));
popup.addAction(tr("Delete all images"), this, SLOT(removeAllPhotos));
popup.addAction(tr("Delete selected images"), this, SLOT(removeSelectedPhotos()));
popup.addAction(tr("Delete all images"), this, SLOT(removeAllPhotos()));
popup.exec(event->globalPos());
event->accept();
}

View file

@ -21,12 +21,13 @@ public:
protected:
void contextMenuEvent(QContextMenuEvent *ev) override;
private:
private slots:
void addPhotosFromFile();
void addPhotosFromURL();
void removeAllPhotos();
void removeSelectedPhotos();
private:
Ui::TabDivePhotos *ui;
DivePictureModel *divePictureModel;
};