[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [picmi] src/gui: Port to new connect api
From:       Jakob Gruber <jakob.gruber () gmail ! com>
Date:       2015-07-15 13:42:37
Message-ID: E1ZFMxJ-0006mw-Lr () scm ! kde ! org
[Download RAW message or body]

Git commit dedc787ec2e78e4754b83f9b9da78bc9be9656fb by Jakob Gruber, on behalf of \
Montel Laurent. Committed on 15/07/2015 at 09:23.
Pushed by gruber into branch 'master'.

Port to new connect api

M  +2    -2    src/gui/mainwindow.cpp
M  +2    -2    src/gui/selectboardwindow.cpp
M  +4    -4    src/gui/settingswindow.cpp

http://commits.kde.org/picmi/dedc787ec2e78e4754b83f9b9da78bc9be9656fb

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()


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic