diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-08-27 11:35:39 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-08-29 22:05:09 +0200 |
commit | add8262f72befc4c6a25403a21269030111054d1 (patch) | |
tree | 5306de98a9fc7109851828eb0dc4a1a9a42fe15c /src/widgets/styles/qwindowsstyle.cpp | |
parent | 62c08441099a4e561fe5b4ad644a11c2e1f4d2d8 (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/qwindowsstyle.cpp')
-rw-r--r-- | src/widgets/styles/qwindowsstyle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp index 619dbcdb52..e3c2a54051 100644 --- a/src/widgets/styles/qwindowsstyle.cpp +++ b/src/widgets/styles/qwindowsstyle.cpp @@ -1025,7 +1025,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, { bool vertical = false, inverted = false; if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)) { - vertical = pb->orientation == Qt::Vertical; + vertical = !(pb->state & QStyle::State_Horizontal); inverted = pb->invertedAppearance; } @@ -1691,7 +1691,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai if (!rect.isValid()) return; - const bool vertical = pb->orientation == Qt::Vertical; + const bool vertical = !(pb->state & QStyle::State_Horizontal); const bool inverted = pb->invertedAppearance; QTransform m; |