Remove duplicate non-const methods from QProgressBar.

Task-number: QTBUG-23524
Change-Id: I80f7eecb9f892fcd026b3c3f9159958fc99cfe23
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Jason McDonald 2012-04-02 22:51:03 +10:00 committed by Qt by Nokia
parent 3a9c06b7bd
commit eb04862920
2 changed files with 6 additions and 8 deletions

View File

@ -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;
}

View File

@ -92,11 +92,9 @@ public:
Qt::Orientation orientation() const;
void setInvertedAppearance(bool invert);
bool invertedAppearance(); //### Qt5 make const
bool invertedAppearance() const { return const_cast<QProgressBar *>(this)->invertedAppearance(); }
bool invertedAppearance() const;
void setTextDirection(QProgressBar::Direction textDirection);
QProgressBar::Direction textDirection(); //### Qt5 make const
QProgressBar::Direction textDirection() const { return const_cast<QProgressBar *>(this)->textDirection(); }
QProgressBar::Direction textDirection() const;
void setFormat(const QString &format);
QString format() const;