Fix deprecation of CheckBox::stateChanged

This commit is contained in:
sgourdas 2024-09-10 14:44:31 +03:00
parent 5b53f5e4b0
commit 9b014ccf66

View File

@ -12,7 +12,11 @@ ContentTypeFilter::ContentTypeFilter(QString name, QWidget *parent)
m_states[Qt::Checked] = gt("no");
setText(gt(m_name) + " : " + m_states[checkState()]);
setStyleSheet("* { color: #666666; }");
connect(this, &QCheckBox::stateChanged, this, &ContentTypeFilter::onStateChanged);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
connect(this, &QCheckBox::checkStateChanged, this, &ContentTypeFilter::onStateChanged);
#else
connect(this, &QCheckBox::stateChanged, this, &ContentTypeFilter::onStateChanged);
#endif
}
void ContentTypeFilter::onStateChanged(int state)