27 lines
1.0 KiB
Diff
27 lines
1.0 KiB
Diff
From f724a5b9f755b22240180ebbb3743bea9235dc33 Mon Sep 17 00:00:00 2001
|
|
From: Robin Lee <cheeselee@fedoraproject.org>
|
|
Date: Wed, 14 Oct 2015 22:04:46 +0800
|
|
Subject: [PATCH] Use qreal instead of double
|
|
|
|
Since qreal is float on ARM, using double here will fail to compile.
|
|
---
|
|
src/gui/widgets/starrating.cpp | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/gui/widgets/starrating.cpp b/src/gui/widgets/starrating.cpp
|
|
index 62b7afe..1fb149d 100644
|
|
--- a/src/gui/widgets/starrating.cpp
|
|
+++ b/src/gui/widgets/starrating.cpp
|
|
@@ -246,7 +246,7 @@ double StarRating::percentForPosition(const QPoint &pos, int numTotalStars, cons
|
|
const int starSize = qMin(inside.height() - 2 * Private::paintMargin, (inside.width() - 2 * Private::paintMargin) / numTotalStars);
|
|
const int width = starSize * numTotalStars;
|
|
const int x = pos.x() - Private::paintMargin - inside.left();
|
|
- const double percent = x * 100.0 / width;
|
|
+ const qreal percent = x * 100.0 / width;
|
|
return qMax(qreal(0.0), qMin(qreal(100.0), percent));
|
|
}
|
|
|
|
--
|
|
2.5.0
|
|
|