aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Beltrame <lbeltrame@kde.org>2016-08-03 14:43:59 (GMT)
committerLuca Beltrame <lbeltrame@kde.org>2016-08-03 14:43:59 (GMT)
commitc2d83603006f893522f27481ffa9953fd6fd5a10 (patch)
tree60caf9434ac8f4250033e0b880d9e11a0387c9fc
parentb9bad28df92ef30360eafa6703b93c1d3374770e (diff)
Fix compilation
/home/abuild/rpmbuild/BUILD/kqtquickcharts-16.11.60git.20150521T100406~b9bad28/src/xychartcore.cpp:285:40: error: call of overloaded 'abs(qreal)' is ambiguous Use the same approach as umbrello, revision 5a61fbc0e6218a9e40a53d4bc2f3785dcdd2eb68
-rw-r--r--src/xychartcore.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xychartcore.cpp b/src/xychartcore.cpp
index ffebfcc..f6fe57f 100644
--- a/src/xychartcore.cpp
+++ b/src/xychartcore.cpp
@@ -282,7 +282,7 @@ QPointF XYChartCore::translatePoint(QPointF point)
QList<qreal> XYChartCore::generateAxisLabels(const qreal minValue, const qreal maxValue)
{
// Distance between labels with preferred number of labels
- qreal div = abs(maxValue - minValue) / m_axisLabelCountGoal;
+ qreal div = fabs(maxValue - minValue) / m_axisLabelCountGoal;
// Find power of 10 to scale preferred increments to
qreal scale = std::pow(10, floor(std::log10(div)));