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 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'shemov.cpp') 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()); -- cgit v1.2.3-70-g09d2