diff --git a/src/widgets/widgets/qprogressbar.cpp b/src/widgets/widgets/qprogressbar.cpp index 3e5b78fe2b..c02aa0e875 100644 --- a/src/widgets/widgets/qprogressbar.cpp +++ b/src/widgets/widgets/qprogressbar.cpp @@ -526,9 +526,9 @@ void QProgressBar::setInvertedAppearance(bool invert) update(); } -bool QProgressBar::invertedAppearance() +bool QProgressBar::invertedAppearance() const { - Q_D(QProgressBar); + Q_D(const QProgressBar); return d->invertedAppearance; } @@ -549,9 +549,9 @@ void QProgressBar::setTextDirection(QProgressBar::Direction textDirection) update(); } -QProgressBar::Direction QProgressBar::textDirection() +QProgressBar::Direction QProgressBar::textDirection() const { - Q_D(QProgressBar); + Q_D(const QProgressBar); return d->textDirection; } diff --git a/src/widgets/widgets/qprogressbar.h b/src/widgets/widgets/qprogressbar.h index fad1ee4e0b..65ec5fa404 100644 --- a/src/widgets/widgets/qprogressbar.h +++ b/src/widgets/widgets/qprogressbar.h @@ -92,11 +92,9 @@ public: Qt::Orientation orientation() const; void setInvertedAppearance(bool invert); - bool invertedAppearance(); //### Qt5 make const - bool invertedAppearance() const { return const_cast(this)->invertedAppearance(); } + bool invertedAppearance() const; void setTextDirection(QProgressBar::Direction textDirection); - QProgressBar::Direction textDirection(); //### Qt5 make const - QProgressBar::Direction textDirection() const { return const_cast(this)->textDirection(); } + QProgressBar::Direction textDirection() const; void setFormat(const QString &format); QString format() const;