summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2017-12-26 18:31:44 +0100
committerArno <arno@disconnect.de>2017-12-26 18:31:44 +0100
commit20f9863c1d15fa4ea6d9ff5a6991a140c6a735d1 (patch)
tree3ba0dcba39e45d3a83e78727ab8afdb19e0ed16e /shemov.cpp
parenta2bedaef2361ce02de7cbf17d5f650e988fa8b63 (diff)
downloadSheMov-20f9863c1d15fa4ea6d9ff5a6991a140c6a735d1.tar.gz
SheMov-20f9863c1d15fa4ea6d9ff5a6991a140c6a735d1.tar.bz2
SheMov-20f9863c1d15fa4ea6d9ff5a6991a140c6a735d1.zip
Get rid of QSignalMapper mOpenTimesFSMapper
and replace it with a lambda.
Diffstat (limited to 'shemov.cpp')
-rw-r--r--shemov.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/shemov.cpp b/shemov.cpp
index 3aeec9d..fde5a0f 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -387,15 +387,12 @@ void SheMov::createActions(){
mPlaySelectedFSA = new QAction(tr("Play selected movies..."), this);
connect(mPlaySelectedFSA, SIGNAL(triggered()), mFSWidget, SLOT(playSelected()));
mOpenTimesFSAG = new QActionGroup(this);
- mOpenTimesFSMapper = new QSignalMapper(this);
for(int i = 2; i < 6; ++i){
QString actString = QString("Play %1 times...").arg(i);
QAction *playTimesA = new QAction(actString, this);
- mOpenTimesFSMapper->setMapping(playTimesA, i);
- connect(playTimesA, SIGNAL(triggered()), mOpenTimesFSMapper, SLOT(map()));
+ connect(playTimesA, &QAction::triggered, [=] { mFSWidget->playSelectedRepeat(i); });
mOpenTimesFSAG->addAction(playTimesA);
}
- connect(mOpenTimesFSMapper, SIGNAL(mapped(int)), mFSWidget, SLOT(playSelectedRepeat(int)));
mOpenTimesFSAG->addAction(createSeparator());
QString infiniteTimes = QString(tr("Play %1 times")).arg(QChar(0x221E)); // infinite
mPlaySelectedInfTimesA = new QAction(infiniteTimes, this);