From fdfcbd0315d04580bf10d7b9129fa32665dfeaae Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 14 Oct 2019 20:57:13 +0200 Subject: Cleanup: use pointer-to-member-function in addAction() calls Since requiring Qt >= 5.9.1, we can use the pointer-to-member-function overloads of addAction (introduced in Qt 5.6). This has the advantage of compile-time checking of the signal/slot parameters. Signed-off-by: Berthold Stoeger --- desktop-widgets/tab-widgets/TabDivePhotos.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'desktop-widgets/tab-widgets') diff --git a/desktop-widgets/tab-widgets/TabDivePhotos.cpp b/desktop-widgets/tab-widgets/TabDivePhotos.cpp index fc84e1972..72a14916b 100644 --- a/desktop-widgets/tab-widgets/TabDivePhotos.cpp +++ b/desktop-widgets/tab-widgets/TabDivePhotos.cpp @@ -52,14 +52,14 @@ void TabDivePhotos::clear() void TabDivePhotos::contextMenuEvent(QContextMenuEvent *event) { QMenu popup(this); - popup.addAction(tr("Load media from file(s)"), this, SLOT(addPhotosFromFile())); - popup.addAction(tr("Load media file(s) from web"), this, SLOT(addPhotosFromURL())); + popup.addAction(tr("Load media from file(s)"), this, &TabDivePhotos::addPhotosFromFile); + popup.addAction(tr("Load media file(s) from web"), this, &TabDivePhotos::addPhotosFromURL); popup.addSeparator(); - popup.addAction(tr("Delete selected media files"), this, SLOT(removeSelectedPhotos())); - popup.addAction(tr("Delete all media files"), this, SLOT(removeAllPhotos())); - popup.addAction(tr("Open folder of selected media files"), this, SLOT(openFolderOfSelectedFiles())); - popup.addAction(tr("Recalculate selected thumbnails"), this, SLOT(recalculateSelectedThumbnails())); - popup.addAction(tr("Save dive data as subtitles"), this, SLOT(saveSubtitles())); + popup.addAction(tr("Delete selected media files"), this, &TabDivePhotos::removeSelectedPhotos); + popup.addAction(tr("Delete all media files"), this, &TabDivePhotos::removeAllPhotos); + popup.addAction(tr("Open folder of selected media files"), this, &TabDivePhotos::openFolderOfSelectedFiles); + popup.addAction(tr("Recalculate selected thumbnails"), this, &TabDivePhotos::recalculateSelectedThumbnails); + popup.addAction(tr("Save dive data as subtitles"), this, &TabDivePhotos::saveSubtitles); popup.exec(event->globalPos()); event->accept(); } -- cgit v1.2.3-70-g09d2