summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2017-12-26 19:48:10 +0100
committerArno <arno@disconnect.de>2017-12-26 19:51:26 +0100
commit808dbebbc2f90c4ff1722410d2d40d52c07cef3d (patch)
tree274871ef4bc028a8d8bdd3299dc947ca9cb8b1e2 /shemov.cpp
parent71c0c7064d37097cb7371ae07e880bcf362c04c9 (diff)
downloadSheMov-808dbebbc2f90c4ff1722410d2d40d52c07cef3d.tar.gz
SheMov-808dbebbc2f90c4ff1722410d2d40d52c07cef3d.tar.bz2
SheMov-808dbebbc2f90c4ff1722410d2d40d52c07cef3d.zip
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}
Diffstat (limited to 'shemov.cpp')
-rw-r--r--shemov.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/shemov.cpp b/shemov.cpp
index 595ab00..42e6784 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -10,7 +10,6 @@
#include <QMenuBar>
#include <QStatusBar>
#include <QLabel>
-#include <QSignalMapper>
#include <QSettings>
#include <QMessageBox>
#include <QCloseEvent>
@@ -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());