aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/curveeditor/curveeditorstyle.h
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-10-20 11:05:46 +0200
committerEike Ziller <eike.ziller@qt.io>2020-10-20 09:19:34 +0000
commit3614ab81ce9726b17b0c725ff55e1ae5be3ab7d1 (patch)
treeb4dbdf6bbca8798e1f2e4e348166e5fad46523f7 /src/plugins/qmldesigner/components/curveeditor/curveeditorstyle.h
parent08d84a688a2cd2bac6076cef09af04c3f9d29b90 (diff)
QmlDesigner: Fix incorrect conversion between double and int/long
And fix macOS build which complained that std::abs with doubles is ambiguous (between int and long and long long). Amends aaf564cab7cbb0a79c37098bd9642a72cef9a9ba Change-Id: I87d4453afa4dda676cc27c219d7dbfc22fcee70a Reviewed-by: Knud Dollereder <knud.dollereder@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src/plugins/qmldesigner/components/curveeditor/curveeditorstyle.h')
-rw-r--r--src/plugins/qmldesigner/components/curveeditor/curveeditorstyle.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/qmldesigner/components/curveeditor/curveeditorstyle.h b/src/plugins/qmldesigner/components/curveeditor/curveeditorstyle.h
index 854fabff23..3eda30dfcd 100644
--- a/src/plugins/qmldesigner/components/curveeditor/curveeditorstyle.h
+++ b/src/plugins/qmldesigner/components/curveeditor/curveeditorstyle.h
@@ -110,7 +110,7 @@ struct CurveEditorStyle
static constexpr double defaultValueMin = -1.0;
static constexpr double defaultValueMax = 1.0;
- static double defaultValueRange() { return std::abs(defaultValueMin - defaultValueMax); }
+ static double defaultValueRange() { return std::fabs(defaultValueMin - defaultValueMax); }
Shortcuts shortcuts;