From 808dbebbc2f90c4ff1722410d2d40d52c07cef3d Mon Sep 17 00:00:00 2001 From: Arno Date: Tue, 26 Dec 2017 19:48:10 +0100 Subject: Get rid of PVAddMapper QSignalMapper One has to ask what it is good for now, maybe totally useless after revamping the slide dialog, but that's for another commit... This also eliminates QSignalMapper from shemov.{h,cpp} --- shemov.cpp | 9 ++------- shemov.h | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/shemov.cpp b/shemov.cpp index 595ab00..42e6784 100644 --- a/shemov.cpp +++ b/shemov.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -528,16 +527,12 @@ void SheMov::createActions(){ mPicWidget->picView()->addAction(mPVToggleA); // Add selected + Replace with selected - QSignalMapper *PVAddMapper = new QSignalMapper(this); mPVAddA = new QAction(QIcon(":/used_tampon.png"), tr("Add selected"), this); - connect(mPVAddA, SIGNAL(triggered()), PVAddMapper, SLOT(map())); - PVAddMapper->setMapping(mPVAddA, false); + connect(mPVAddA, &QAction::triggered, [=] { mPicWidget->picView()->setPVData(false); }); mPicWidget->picView()->addAction(mPVAddA); mPVReplaceA = new QAction(QIcon(":/clean_tampon.png"), tr("Replace with selected"), this); - connect(mPVReplaceA, SIGNAL(triggered()), PVAddMapper, SLOT(map())); - PVAddMapper->setMapping(mPVReplaceA, true); + connect(mPVReplaceA, &QAction::triggered, [=] { mPicWidget->picView()->setPVData(true); }); mPicWidget->picView()->addAction(mPVReplaceA); - connect(PVAddMapper, SIGNAL(mapped(int)), mPicWidget->picView(), SLOT(setPVData(int))); // Refresh mPicWidget->picView()->addAction(createSeparator()); diff --git a/shemov.h b/shemov.h index 4f59379..14d807d 100644 --- a/shemov.h +++ b/shemov.h @@ -14,7 +14,6 @@ class QTabWidget; class FilesystemWidget; class QLabel; -class QSignalMapper; class QActionGroup; class NewMovieWizard; class PicturesWidget; -- cgit v1.2.3-70-g09d2