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/widgets | |
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/widgets')
-rw-r--r-- | src/widgets/widgets/qprogressbar.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/widgets/qprogressbar.cpp b/src/widgets/widgets/qprogressbar.cpp index f94cbd3172..e2d4875f54 100644 --- a/src/widgets/widgets/qprogressbar.cpp +++ b/src/widgets/widgets/qprogressbar.cpp @@ -135,7 +135,6 @@ void QProgressBar::initStyleOption(QStyleOptionProgressBar *option) const option->textAlignment = d->alignment; option->textVisible = d->textVisible; option->text = text(); - option->orientation = d->orientation; // ### Qt 6: remove this member from QStyleOptionProgressBar option->invertedAppearance = d->invertedAppearance; option->bottomToTop = d->textDirection == QProgressBar::BottomToTop; } @@ -424,7 +423,7 @@ QSize QProgressBar::sizeHint() const initStyleOption(&opt); int cw = style()->pixelMetric(QStyle::PM_ProgressBarChunkWidth, &opt, this); QSize size = QSize(qMax(9, cw) * 7 + fm.horizontalAdvance(QLatin1Char('0')) * 4, fm.height() + 8); - if (opt.orientation == Qt::Vertical) + if (!(opt.state & QStyle::State_Horizontal)) size = size.transposed(); return style()->sizeFromContents(QStyle::CT_ProgressBar, &opt, size, this); } |