summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-01-29 19:54:38 +0100
committerJakob Gruber <[email protected]>2015-07-15 11:23:17 +0200
commitdedc787ec2e78e4754b83f9b9da78bc9be9656fb (patch)
treee9b29934bd0a8fc74d4ddacd88680f0d782d5b19
parent71c7785af1845763ff4ae9b6b9bea0c953042ea4 (diff)
Port to new connect api
-rw-r--r--src/gui/mainwindow.cpp4
-rw-r--r--src/gui/selectboardwindow.cpp4
-rw-r--r--src/gui/settingswindow.cpp8
3 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp
index 867208f..3c494a7 100644
--- a/src/gui/mainwindow.cpp
+++ b/src/gui/mainwindow.cpp
@@ -219,7 +219,7 @@ void MainWindow::startPresetGame(QSharedPointer<Level> board) {
void MainWindow::startGame() {
if (m_scene) {
- disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(updatePlayedTime()));
+ disconnect(&m_timer, &QTimer::timeout, this, &MainWindow::updatePlayedTime);
}
m_action_undo->setEnabled(false);
@@ -243,7 +243,7 @@ void MainWindow::startGame() {
m_view.setFocus();
m_view.setPaused(false);
- connect(&m_timer, SIGNAL(timeout()), this, SLOT(updatePlayedTime()));
+ connect(&m_timer, &QTimer::timeout, this, &MainWindow::updatePlayedTime);
connect(m_game.data(), SIGNAL(stateChanged()), this, SLOT(updatePositions()));
connect(m_game.data(), SIGNAL(gameCompleted()), this, SLOT(gameCompleted()));
connect(m_game.data(), SIGNAL(gameWon()), this, SLOT(gameWon()));
diff --git a/src/gui/selectboardwindow.cpp b/src/gui/selectboardwindow.cpp
index fd074e6..6ff0cce 100644
--- a/src/gui/selectboardwindow.cpp
+++ b/src/gui/selectboardwindow.cpp
@@ -171,8 +171,8 @@ SelectBoardWindow::SelectBoardWindow(QWidget *parent)
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
- connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
- connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+ connect(buttonBox, &QDialogButtonBox::accepted, this, &SelectBoardWindow::accept);
+ connect(buttonBox, &QDialogButtonBox::rejected, this, &SelectBoardWindow::reject);
mainLayout->addWidget(buttonBox);
QWidget *mainWidget = new QWidget(this);
diff --git a/src/gui/settingswindow.cpp b/src/gui/settingswindow.cpp
index 75f13a7..39ee17b 100644
--- a/src/gui/settingswindow.cpp
+++ b/src/gui/settingswindow.cpp
@@ -37,10 +37,10 @@ SettingsWindow::SettingsWindow(QWidget *parent) :
restoreSettings();
- connect(ui->bgToolButton, SIGNAL(clicked()), this, SLOT(bgToolButtonClicked()));
- connect(ui->fontColorSolvedPushButton, SIGNAL(clicked()), this, SLOT(selectSolvedColor()));
- connect(ui->fontColorUnsolvedPushButton, SIGNAL(clicked()), this, SLOT(selectUnsolvedColor()));
- connect(ui->bgCustomRadioButton, SIGNAL(toggled(bool)), ui->bgToolButton, SLOT(setEnabled(bool)));
+ connect(ui->bgToolButton, &QToolButton::clicked, this, &SettingsWindow::bgToolButtonClicked);
+ connect(ui->fontColorSolvedPushButton, &QPushButton::clicked, this, &SettingsWindow::selectSolvedColor);
+ connect(ui->fontColorUnsolvedPushButton, &QPushButton::clicked, this, &SettingsWindow::selectUnsolvedColor);
+ connect(ui->bgCustomRadioButton, &QRadioButton::toggled, ui->bgToolButton, &QToolButton::setEnabled);
}
SettingsWindow::~SettingsWindow()