diff options
| author | Arno <arno@disconnect.de> | 2017-12-26 18:31:44 +0100 | 
|---|---|---|
| committer | Arno <arno@disconnect.de> | 2017-12-26 18:31:44 +0100 | 
| commit | 20f9863c1d15fa4ea6d9ff5a6991a140c6a735d1 (patch) | |
| tree | 3ba0dcba39e45d3a83e78727ab8afdb19e0ed16e /shemov.cpp | |
| parent | a2bedaef2361ce02de7cbf17d5f650e988fa8b63 (diff) | |
| download | SheMov-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.cpp | 5 | 
1 files changed, 1 insertions, 4 deletions
| @@ -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); | 
