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 aaf564cab7

Change-Id: I87d4453afa4dda676cc27c219d7dbfc22fcee70a
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Eike Ziller
2020-10-20 11:05:46 +02:00
parent 08d84a688a
commit 3614ab81ce

View File

@@ -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;