Commit 4330c947 authored by Laurent Montel's avatar Laurent Montel 😁

Port to new connect api

parent 801c3cd0
......@@ -45,17 +45,17 @@ KReversiGame::KReversiGame(KReversiPlayer *blackPlayer, KReversiPlayer *whitePla
m_player[White] = whitePlayer;
m_player[Black] = blackPlayer;
connect(this, SIGNAL(blackPlayerCantMove()), blackPlayer, SLOT(skipTurn()));
connect(this, SIGNAL(blackPlayerTurn()), blackPlayer, SLOT(takeTurn()));
connect(this, SIGNAL(gameOver()), blackPlayer, SLOT(gameOver()));
connect(blackPlayer, SIGNAL(makeMove(KReversiMove)), this, SLOT(blackPlayerMove(KReversiMove)));
connect(blackPlayer, SIGNAL(ready()), this, SLOT(blackReady()));
connect(this, SIGNAL(whitePlayerCantMove()), whitePlayer, SLOT(skipTurn()));
connect(this, SIGNAL(whitePlayerTurn()), whitePlayer, SLOT(takeTurn()));
connect(this, SIGNAL(gameOver()), whitePlayer, SLOT(gameOver()));
connect(whitePlayer, SIGNAL(makeMove(KReversiMove)), this, SLOT(whitePlayerMove(KReversiMove)));
connect(whitePlayer, SIGNAL(ready()), this, SLOT(whiteReady()));
connect(this, &KReversiGame::blackPlayerCantMove, blackPlayer, &KReversiPlayer::skipTurn);
connect(this, &KReversiGame::blackPlayerTurn, blackPlayer, &KReversiPlayer::takeTurn);
connect(this, &KReversiGame::gameOver, blackPlayer, &KReversiPlayer::gameOver);
connect(blackPlayer, &KReversiPlayer::makeMove, this, &KReversiGame::blackPlayerMove);
connect(blackPlayer, &KReversiPlayer::ready, this, &KReversiGame::blackReady);
connect(this, &KReversiGame::whitePlayerCantMove, whitePlayer, &KReversiPlayer::skipTurn);
connect(this, &KReversiGame::whitePlayerTurn, whitePlayer, &KReversiPlayer::takeTurn);
connect(this, &KReversiGame::gameOver, whitePlayer, &KReversiPlayer::gameOver);
connect(whitePlayer, &KReversiPlayer::makeMove, this, &KReversiGame::whitePlayerMove);
connect(whitePlayer, &KReversiPlayer::ready, this, &KReversiGame::whiteReady);
m_engine = new Engine(1);
......
......@@ -66,7 +66,7 @@ KReversiMainWindow::KReversiMainWindow(QWidget* parent, bool startDemo)
);
KgDifficultyGUI::init(this);
connect(Kg::difficulty(), SIGNAL(currentLevelChanged(const KgDifficultyLevel*)), SLOT(levelChanged()));
connect(Kg::difficulty(), &KgDifficulty::currentLevelChanged, this, &KReversiMainWindow::levelChanged);
Kg::difficulty()->setEditable(false);
// initialize history dock
......@@ -409,8 +409,8 @@ void KReversiMainWindow::receivedGameStartInformation(GameStartInformation info)
for (int i = 0; i < 2; i++) // iterating white to black
if (info.type[i] == GameStartInformation::Human)
connect(m_view, SIGNAL(userMove(KReversiPos)),
(KReversiHumanPlayer *)(m_player[i]), SLOT(onUICellClick(KReversiPos)));
connect(m_view, &KReversiView::userMove,
(KReversiHumanPlayer *)(m_player[i]), &KReversiHumanPlayer::onUICellClick);
updateStatusBar();
updateHistory();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment