Replace static_cast by qOverload

This commit is contained in:
Chocobo1
2019-07-25 01:41:09 +08:00
parent ee0d2d2220
commit 7ab3479a34
16 changed files with 39 additions and 40 deletions

View File

@@ -341,7 +341,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
connect(m_ui->comboEncryption, qComboBoxCurrentIndexChanged, this, &ThisType::enableApplyButton);
connect(m_ui->checkMaxRatio, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
connect(m_ui->checkMaxRatio, &QAbstractButton::toggled, this, &ThisType::toggleComboRatioLimitAct);
connect(m_ui->spinMaxRatio, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
connect(m_ui->spinMaxRatio, qOverload<double>(&QDoubleSpinBox::valueChanged),
this, &ThisType::enableApplyButton);
connect(m_ui->comboRatioLimitAct, qComboBoxCurrentIndexChanged, this, &ThisType::enableApplyButton);
connect(m_ui->checkMaxSeedingMinutes, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);