fix Qt6 deprecation warnings

This commit is contained in:
oltolm 2024-11-01 13:05:14 +01:00
commit 49c72efcd3
12 changed files with 94 additions and 0 deletions

View file

@ -77,8 +77,13 @@ NKitWarningDialog::NKitWarningDialog(QWidget* parent) : QDialog(parent)
connect(cancel, &QPushButton::clicked, this, &QDialog::reject);
ok->setEnabled(false);
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
connect(checkbox_accept, &QCheckBox::checkStateChanged,
[ok](Qt::CheckState state) { ok->setEnabled(state == Qt::Checked); });
#else
connect(checkbox_accept, &QCheckBox::stateChanged,
[ok](int state) { ok->setEnabled(state == Qt::Checked); });
#endif
connect(this, &QDialog::accepted, [checkbox_skip] {
Config::SetBase(Config::MAIN_SKIP_NKIT_WARNING, checkbox_skip->isChecked());