summaryrefslogtreecommitdiffstats
path: root/configurationdialog.cpp
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2017-03-24 18:18:49 +0100
committerArno <arno@disconnect.de>2017-03-24 18:18:49 +0100
commita55b7eb7a765f09f0e83e9d3ce5696f540b6bd9b (patch)
tree2f331faf9fb16130494482c212df76bb5180e8d7 /configurationdialog.cpp
parentc4388dcc1830d5df4f04ec2df42d1359b68cbda3 (diff)
downloadBeetPlayer-a55b7eb7a765f09f0e83e9d3ce5696f540b6bd9b.tar.gz
BeetPlayer-a55b7eb7a765f09f0e83e9d3ce5696f540b6bd9b.tar.bz2
BeetPlayer-a55b7eb7a765f09f0e83e9d3ce5696f540b6bd9b.zip
Change to new style connect syntax
Quite some code churn, but I like the idea that wrong connections are compile time errors. Since I had to get rid of default arguments in Slots, this simplified things in doPopulateByFolder...
Diffstat (limited to 'configurationdialog.cpp')
-rw-r--r--configurationdialog.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/configurationdialog.cpp b/configurationdialog.cpp
index 1d3b605..58e33e8 100644
--- a/configurationdialog.cpp
+++ b/configurationdialog.cpp
@@ -33,9 +33,9 @@ ConfigurationDialog::ConfigurationDialog(QWidget *parent, Qt::WindowFlags f) : Q
//buttons
QPushButton *acceptB = new QPushButton(tr("Save"));
- connect(acceptB, SIGNAL(clicked()), this, SLOT(accept()));
+ connect(acceptB, &QPushButton::clicked, this, &ConfigurationDialog::accept);
QPushButton *cancelB = new QPushButton(tr("Cancel"));
- connect(cancelB, SIGNAL(clicked()), this, SLOT(reject()));
+ connect(cancelB, &QPushButton::clicked, this, &ConfigurationDialog::reject);
QHBoxLayout *bLayout = new QHBoxLayout;
bLayout->addStretch();
bLayout->addWidget(acceptB);
@@ -71,9 +71,9 @@ ConfigurationDialog::ConfigurationDialog(QWidget *parent, Qt::WindowFlags f) : Q
QSignalMapper *colorMapper = new QSignalMapper(this);
colorMapper->setMapping(baseColorB, mBaseColorL);
colorMapper->setMapping(altColorB, mAltColorL);
- connect(baseColorB, SIGNAL(clicked()), colorMapper, SLOT(map()));
- connect(altColorB, SIGNAL(clicked()), colorMapper, SLOT(map()));
- connect(colorMapper, SIGNAL(mapped(QWidget*)), this, SLOT(chooseColor(QWidget*)));
+ connect(baseColorB, &QPushButton::clicked, colorMapper, static_cast<void(QSignalMapper::*)()>(&QSignalMapper::map));
+ connect(altColorB, &QPushButton::clicked, colorMapper, static_cast<void(QSignalMapper::*)()>(&QSignalMapper::map));
+ connect(colorMapper, static_cast<void(QSignalMapper::*)(QWidget*)>(&QSignalMapper::mapped), this, &ConfigurationDialog::chooseColor);
//dialog layout
QVBoxLayout *mainLayout = new QVBoxLayout;