summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qplastiquestyle.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-07-22 11:56:51 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-07-22 12:02:51 (GMT)
commit27e5a1f9542b03a6930f002e8d7dafd97cf88a1a (patch)
treeed5dbaaa9a0824ba1910f89db8bf38374b574b58 /src/gui/styles/qplastiquestyle.cpp
parent336954fb9b990c6d7c44ed3a8d676a6e21b2057f (diff)
downloadQt-27e5a1f9542b03a6930f002e8d7dafd97cf88a1a.zip
Qt-27e5a1f9542b03a6930f002e8d7dafd97cf88a1a.tar.gz
Qt-27e5a1f9542b03a6930f002e8d7dafd97cf88a1a.tar.bz2
Support for very large range in QProgressBar
Regression since my last commit. Task-number: 152227
Diffstat (limited to 'src/gui/styles/qplastiquestyle.cpp')
-rw-r--r--src/gui/styles/qplastiquestyle.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp
index cd0bd0a..80c9881 100644
--- a/src/gui/styles/qplastiquestyle.cpp
+++ b/src/gui/styles/qplastiquestyle.cpp
@@ -2571,8 +2571,7 @@ void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *op
painter->setTransform(m, true);
}
- double vc6_workaround = ((bar->progress - qint64(bar->minimum)) / qMax(double(1.0), double(qint64(bar->maximum) - qint64(bar->minimum))) * rect.width());
- int progressIndicatorPos = int(vc6_workaround);
+ int progressIndicatorPos = (bar->progress - qreal(bar->minimum)) / qMax(qreal(1.0), qreal(bar->maximum) - bar->minimum) * rect.width();
bool flip = (!vertical && (((bar->direction == Qt::RightToLeft) && !inverted)
|| ((bar->direction == Qt::LeftToRight) && inverted))) || (vertical && ((!inverted && !bottomToTop) || (inverted && bottomToTop)));