Deprecate the QStyleOptionProgressBar::orientation member
Its contents are already inside the "state" member. Fixes a "TODO" for Qt 5 (bumping it to Qt 6, where we will be able to break API). [ChangeLog][QtWidgets][Styles] The usage of the QStyleOptionProgressBar::orientation member has been deprecated. Task-number: QTBUG-25121 Change-Id: Ie531bb2f2733b15a213e83c9706468e2bf829359 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>bb10
parent
d84a6eab51
commit
6fd5870df0
|
|
@ -1634,6 +1634,9 @@ QStyleOptionProgressBar::QStyleOptionProgressBar(int version)
|
|||
\brief the progress bar's orientation (horizontal or vertical);
|
||||
the default orentation is Qt::Horizontal
|
||||
|
||||
\deprecated
|
||||
Use the QStyle::State_Horizontal flag instead (in the the QStyleOption::state member).
|
||||
|
||||
\sa QProgressBar::orientation
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ public:
|
|||
QString text;
|
||||
Qt::Alignment textAlignment;
|
||||
bool textVisible;
|
||||
Qt::Orientation orientation;
|
||||
Qt::Orientation orientation; // ### Qt 6: remove
|
||||
bool invertedAppearance;
|
||||
bool bottomToTop;
|
||||
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ void QProgressBar::initStyleOption(QStyleOptionProgressBar *option) const
|
|||
|
||||
if (QStyleOptionProgressBarV2 *optionV2
|
||||
= qstyleoption_cast<QStyleOptionProgressBarV2 *>(option)) {
|
||||
optionV2->orientation = d->orientation; // ### Qt 5: use State_Horizontal instead
|
||||
optionV2->orientation = d->orientation; // ### Qt 6: remove this member from QStyleOptionProgressBarV2
|
||||
optionV2->invertedAppearance = d->invertedAppearance;
|
||||
optionV2->bottomToTop = (d->textDirection == QProgressBar::BottomToTop);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue