fix Qt6 deprecation warnings

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

View File

@@ -15,7 +15,11 @@ TASCheckBox::TASCheckBox(const QString& text, TASInputWindow* parent)
{
setTristate(true);
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
connect(this, &TASCheckBox::checkStateChanged, this, &TASCheckBox::OnUIValueChanged);
#else
connect(this, &TASCheckBox::stateChanged, this, &TASCheckBox::OnUIValueChanged);
#endif
}
bool TASCheckBox::GetValue() const
@@ -58,7 +62,11 @@ void TASCheckBox::mousePressEvent(QMouseEvent* event)
setCheckState(Qt::PartiallyChecked);
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
void TASCheckBox::OnUIValueChanged(Qt::CheckState new_value)
#else
void TASCheckBox::OnUIValueChanged(int new_value)
#endif
{
m_state.OnUIValueChanged(new_value);
}