From 3614ab81ce9726b17b0c725ff55e1ae5be3ab7d1 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 20 Oct 2020 11:05:46 +0200 Subject: 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 Reviewed-by: Thomas Hartmann --- src/plugins/qmldesigner/components/curveeditor/curveeditorstyle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/qmldesigner/components/curveeditor/curveeditorstyle.h') 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; -- cgit v1.2.3