Commit 7d3f2970 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port deprecated signal (qt5.15)

parent 6e25a718
......@@ -114,14 +114,22 @@ GameDialog::GameDialog(QWidget* parent, Qt::WindowFlags f) : QDialog(parent, f),
connect(ui->rbPlayer1Human, &QRadioButton::clicked, this, &GameDialog::player1SettingsChanged);
connect(ui->rbPlayer1Engine, &QRadioButton::clicked, this, &GameDialog::player1SettingsChanged);
connect(ui->pbPlayer1Engine, &QPushButton::clicked, this, &GameDialog::showEngineConfigDialog);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(ui->cbPlayer1Engine, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &GameDialog::checkOkButton);
#else
connect(ui->cbPlayer1Engine, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &GameDialog::checkOkButton);
#endif
//player 2
connect(ui->rbPlayer2Human, &QRadioButton::clicked, this, &GameDialog::player2SettingsChanged);
connect(ui->rbPlayer2Engine, &QRadioButton::clicked, this, &GameDialog::player2SettingsChanged);
connect(ui->rbPlayer2Server, &QRadioButton::clicked, this, &GameDialog::player2SettingsChanged);
connect(ui->pbPlayer2Engine, &QPushButton::clicked, this, &GameDialog::showEngineConfigDialog);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(ui->cbPlayer2Engine, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &GameDialog::checkOkButton);
#else
connect(ui->cbPlayer2Engine, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &GameDialog::checkOkButton);
#endif
//time control
connect(ui->cbTimeControl, &QCheckBox::toggled, this, &GameDialog::timeControlChanged);
......
......@@ -41,7 +41,11 @@ HistoryWidget::HistoryWidget(QWidget* parent, Qt::WindowFlags f): QWidget(parent
ui->twMoves->horizontalHeaderItem(0)->setText(i18n("white"));
ui->twMoves->horizontalHeaderItem(1)->setText(i18n("black"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect( ui->notationComboBox, static_cast<void (QComboBox::*)(int)> (&QComboBox::currentIndexChanged),
#else
connect( ui->notationComboBox, static_cast<void (QComboBox::*)(int, const QString &)>(&QComboBox::currentIndexChanged) ,
#endif
this, &HistoryWidget::updateHistory );
connect( Manager::self(), &Manager::historyChanged, this, &HistoryWidget::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