diff options
Diffstat (limited to 'src/widgets/widgets/qcheckbox.cpp')
-rw-r--r-- | src/widgets/widgets/qcheckbox.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/widgets/widgets/qcheckbox.cpp b/src/widgets/widgets/qcheckbox.cpp index 151c8b1e94..cc013c8c7e 100644 --- a/src/widgets/widgets/qcheckbox.cpp +++ b/src/widgets/widgets/qcheckbox.cpp @@ -28,7 +28,7 @@ public: uint tristate : 1; uint noChange : 1; uint hovering : 1; - uint publishedState : 2; + Qt::CheckState publishedState : 2; void init(); }; @@ -89,6 +89,7 @@ public: \sa QAbstractButton, QRadioButton */ +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) /*! \fn void QCheckBox::stateChanged(int state) @@ -97,6 +98,16 @@ public: \a state contains the checkbox's new Qt::CheckState. */ +#else +/*! + \fn void QCheckBox::stateChanged(Qt::CheckState state) + + This signal is emitted whenever the checkbox's state changes, i.e., + whenever the user checks or unchecks it. + + \a state contains the checkbox's new Qt::CheckState. +*/ +#endif /*! \property QCheckBox::tristate @@ -224,7 +235,7 @@ void QCheckBox::setCheckState(Qt::CheckState state) setChecked(state != Qt::Unchecked); d->blockRefresh = false; d->refresh(); - if ((uint)state != d->publishedState) { + if (state != d->publishedState) { d->publishedState = state; emit stateChanged(state); } @@ -319,7 +330,7 @@ void QCheckBox::checkStateSet() Q_D(QCheckBox); d->noChange = false; Qt::CheckState state = checkState(); - if ((uint)state != d->publishedState) { + if (state != d->publishedState) { d->publishedState = state; emit stateChanged(state); } |