summaryrefslogtreecommitdiffstats
path: root/beetplayer.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 /beetplayer.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 'beetplayer.cpp')
-rw-r--r--beetplayer.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/beetplayer.cpp b/beetplayer.cpp
index ef3f84f..3ccf9d5 100644
--- a/beetplayer.cpp
+++ b/beetplayer.cpp
@@ -34,12 +34,12 @@ BeetPlayer::BeetPlayer(QWidget *parent, Qt::WindowFlags f) : QMainWindow(parent,
splash.showMessage(tr("Constructing Player..."), Qt::AlignHCenter, Qt::yellow);
qApp->processEvents();
mPlayerWidget = new PlayerWidget;
- connect(mPlayerWidget, SIGNAL(viewModeChanged(QString)), this, SLOT(setViewMode(QString)));
- connect(mPlayerWidget, SIGNAL(playModeChanged(QString)), this, SLOT(setPlayMode(QString)));
- connect(mPlayerWidget, SIGNAL(numFilesChanged(int)), this, SLOT(setNumFiles(int)));
- connect(mPlayerWidget, SIGNAL(playListLengthChanged(quint64)), this, SLOT(setPlayListLength(quint64)));
- connect(mPlayerWidget, SIGNAL(message(QString)), this, SLOT(setMessage(QString)));
- connect(mPlayerWidget, SIGNAL(setWinTitle(QString)), this, SLOT(setWindowTitle(QString)));
+ connect(mPlayerWidget, &PlayerWidget::viewModeChanged, this, &BeetPlayer::setViewMode);
+ connect(mPlayerWidget, &PlayerWidget::playModeChanged, this, &BeetPlayer::setPlayMode);
+ connect(mPlayerWidget, &PlayerWidget::numFilesChanged, this, &BeetPlayer::setNumFiles);
+ connect(mPlayerWidget, &PlayerWidget::playListLengthChanged, this, &BeetPlayer::setPlayListLength);
+ connect(mPlayerWidget, &PlayerWidget::message, this, &BeetPlayer::setMessage);
+ connect(mPlayerWidget, &PlayerWidget::setWinTitle, this, &BeetPlayer::setWindowTitle);
createStatusbar();
setCentralWidget(mPlayerWidget);
splash.showMessage(tr("Populating..."), Qt::AlignHCenter, Qt::yellow);
@@ -93,11 +93,11 @@ void BeetPlayer::readSettings(){
void BeetPlayer::createGlobalActions(){
QAction *quitA = new QAction(tr("Quit"), this);
quitA->setShortcut(tr("CTRL+Q"));
- connect(quitA, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));
+ connect(quitA, &QAction::triggered, qApp, &QApplication::closeAllWindows);
quitA->setData(Globals::QuitAction);
Globals::instance()->addAction(quitA);
QAction *configA = new QAction(QIcon(":/chastity_belt.png"), tr("Configure..."), this);
- connect(configA, SIGNAL(triggered()), this, SLOT(configure()));
+ connect(configA, &QAction::triggered, this, &BeetPlayer::configure);
configA->setData(Globals::ConfigAction);
Globals::instance()->addAction(configA);
}