From e2aa651aba89bcc409dd090466b04036277a9a7c Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 22 Jul 2009 15:59:58 +0200 Subject: Compile on embedded --- src/gui/styles/qcleanlooksstyle.cpp | 2 +- src/gui/styles/qgtkstyle.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp index ccf81cb..8f88781 100644 --- a/src/gui/styles/qcleanlooksstyle.cpp +++ b/src/gui/styles/qcleanlooksstyle.cpp @@ -1746,7 +1746,7 @@ void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *o int maxWidth = rect.width() - 4; int minWidth = 4; qreal progress = qMax(bar->progress, bar->minimum); // workaround for bug in QProgressBar - int progressBarWidth = (progress - bar->minimum) * qreal(maxWidth) / qMax(1.0, qreal(bar->maximum) - bar->minimum); + int progressBarWidth = (progress - bar->minimum) * qreal(maxWidth) / qMax(qreal(1.0), qreal(bar->maximum) - bar->minimum); int width = indeterminate ? maxWidth : qMax(minWidth, progressBarWidth); bool reverse = (!vertical && (bar->direction == Qt::RightToLeft)) || vertical; diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 53f3db9..660b4c3 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -2076,7 +2076,7 @@ void QGtkStyle::drawControl(ControlElement element, if (vertical) rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // flip width and height const int progressIndicatorPos = (bar->progress - qreal(bar->minimum)) * rect.width() / - qMax(1.0, qreal(bar->maximum) - bar->minimum); + qMax(qreal(1.0), qreal(bar->maximum) - bar->minimum); if (progressIndicatorPos >= 0 && progressIndicatorPos <= rect.width()) leftRect = QRect(rect.left(), rect.top(), progressIndicatorPos, rect.height()); if (vertical) -- cgit v0.12