aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2018-07-06 19:11:30 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2018-07-06 19:11:30 +0000
commit0c9515e6f8220fc847065a766f8be7612126f18a (patch)
treed1d3307674ba20d1735d4b1da9737c97d3a7ab44 /src/plugins/General
parent9b88354272f32278c8318877fdc0ba2a5133992f (diff)
downloadqmmp-0c9515e6f8220fc847065a766f8be7612126f18a.tar.gz
qmmp-0c9515e6f8220fc847065a766f8be7612126f18a.tar.bz2
qmmp-0c9515e6f8220fc847065a766f8be7612126f18a.zip
replaced QSignalMapper by lambda functions
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8111 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General')
-rw-r--r--src/plugins/General/fileops/fileops.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/plugins/General/fileops/fileops.cpp b/src/plugins/General/fileops/fileops.cpp
index 93c273165..1a57c54a1 100644
--- a/src/plugins/General/fileops/fileops.cpp
+++ b/src/plugins/General/fileops/fileops.cpp
@@ -21,7 +21,6 @@
#include <QAction>
#include <QSettings>
#include <QApplication>
-#include <QSignalMapper>
#include <QProgressDialog>
#include <QMessageBox>
#include <QFile>
@@ -45,7 +44,6 @@ FileOps::FileOps(QObject *parent) : QObject(parent)
QAction *separator2 = new QAction(this);
separator2->setSeparator (true);
//load settings
- QSignalMapper *mapper = new QSignalMapper(this);
QSettings settings(Qmmp::configFile(), QSettings::IniFormat);
settings.beginGroup("FileOps");
int count = settings.value("count", 0).toInt();
@@ -65,13 +63,11 @@ FileOps::FileOps(QObject *parent) : QObject(parent)
m_destinations << settings.value(QString("destination_%1").arg(i)).toString();
QAction *action = new QAction(name, this);
action->setShortcut(settings.value(QString("hotkey_%1").arg(i)).toString());
- connect (action, SIGNAL (triggered (bool)), mapper, SLOT (map()));
- mapper->setMapping(action, i);
+ connect(action, &QAction::triggered, [i,this]{ execAction(i); });
UiHelper::instance()->addAction(action, UiHelper::PLAYLIST_MENU);
}
}
settings.endGroup();
- connect(mapper, SIGNAL(mapped(int)), SLOT(execAction(int)));
UiHelper::instance()->addAction(separator2, UiHelper::PLAYLIST_MENU);
}