summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2024-01-18 10:38:25 +0100
committerMarc Mutz <marc.mutz@qt.io>2024-01-19 17:51:14 +0100
commit3512fb1ec5ff088772170540c4e91b1886fbea45 (patch)
tree7e90b54d3ab4f0f4e8157898e6c8684b20e67175 /src/widgets/widgets
parent6dfc988ea0160071d33870c1a58d0e9d34aeac5d (diff)
QCheckBox: deprecate stateChanged()
[ChangeLog][QtWidgets][Deprecation Notices][QCheckBox] stateChanged(int) has been deprecated in favor of checkStateChanged(Qt:CheckState). Found in API-review. Amends 5a96d13bb5abd5339cf21dd1de7a17152c71f0fc. Pick-to: 6.7 Change-Id: I6ff4aa38c2f43622ba4b127420aff83790785455 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qcheckbox.cpp12
-rw-r--r--src/widgets/widgets/qcheckbox.h3
2 files changed, 12 insertions, 3 deletions
diff --git a/src/widgets/widgets/qcheckbox.cpp b/src/widgets/widgets/qcheckbox.cpp
index 970a15e3a8..88cd603d70 100644
--- a/src/widgets/widgets/qcheckbox.cpp
+++ b/src/widgets/widgets/qcheckbox.cpp
@@ -92,9 +92,7 @@ public:
/*!
\fn void QCheckBox::stateChanged(int state)
- \obsolete
-
- Use checkStateChanged(Qt::CheckState) instead.
+ \deprecated [6.9] Use checkStateChanged(Qt::CheckState) instead.
*/
/*!
@@ -236,7 +234,11 @@ void QCheckBox::setCheckState(Qt::CheckState state)
if (state != d->publishedState) {
d->publishedState = state;
emit checkStateChanged(state);
+#if QT_DEPRECATED_SINCE(6, 9)
+ QT_IGNORE_DEPRECATIONS(
emit stateChanged(state);
+ )
+#endif
}
#if QT_CONFIG(accessibility)
@@ -332,7 +334,11 @@ void QCheckBox::checkStateSet()
if (state != d->publishedState) {
d->publishedState = state;
emit checkStateChanged(state);
+#if QT_DEPRECATED_SINCE(6, 9)
+ QT_IGNORE_DEPRECATIONS(
emit stateChanged(state);
+ )
+#endif
}
}
diff --git a/src/widgets/widgets/qcheckbox.h b/src/widgets/widgets/qcheckbox.h
index 54c2c3c796..de623b7b9e 100644
--- a/src/widgets/widgets/qcheckbox.h
+++ b/src/widgets/widgets/qcheckbox.h
@@ -36,7 +36,10 @@ public:
void setCheckState(Qt::CheckState state);
Q_SIGNALS:
+#if QT_DEPRECATED_SINCE(6, 9)
+ QT_MOC_COMPAT QT_DEPRECATED_VERSION_X_6_9("Use checkStateChanged() instead")
void stateChanged(int);
+#endif
void checkStateChanged(Qt::CheckState);
protected: