From 9b014ccf66caa86d1bad98c8a9ce9fda92dfc9cc Mon Sep 17 00:00:00 2001 From: sgourdas Date: Tue, 10 Sep 2024 14:44:31 +0300 Subject: [PATCH] Fix deprecation of CheckBox::stateChanged --- src/contenttypefilter.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/contenttypefilter.cpp b/src/contenttypefilter.cpp index 97612c3..980b679 100644 --- a/src/contenttypefilter.cpp +++ b/src/contenttypefilter.cpp @@ -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)