summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qfusionstyle.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-08-27 11:35:39 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-08-29 22:05:09 +0200
commitadd8262f72befc4c6a25403a21269030111054d1 (patch)
tree5306de98a9fc7109851828eb0dc4a1a9a42fe15c /src/widgets/styles/qfusionstyle.cpp
parent62c08441099a4e561fe5b4ad644a11c2e1f4d2d8 (diff)
Remove QStyleOptionProgressBar::orientation member
Address ### Qt 6 comment; the information is already stored in the state variable, using the QStyle::State_Horizontal bit. Change-Id: I61d143ba057776f9d622793a0592b5dd4726f25d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/styles/qfusionstyle.cpp')
-rw-r--r--src/widgets/styles/qfusionstyle.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index 3f985bfe4c..daf0710b70 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -1364,8 +1364,7 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
bool indeterminate = (bar->minimum == 0 && bar->maximum == 0);
bool complete = bar->progress == bar->maximum;
- // Get extra style options if version 2
- vertical = (bar->orientation == Qt::Vertical);
+ vertical = !(bar->state & QStyle::State_Horizontal);
inverted = bar->invertedAppearance;
// If the orientation is vertical, we use a transform to rotate
@@ -1474,7 +1473,7 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
painter->save();
bool vertical = false, inverted = false;
- vertical = (bar->orientation == Qt::Vertical);
+ vertical = !(bar->state & QStyle::State_Horizontal);
inverted = bar->invertedAppearance;
if (vertical)
rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // flip width and height