From 57881a95bf730dec7dd010bc086a5c42003840d4 Mon Sep 17 00:00:00 2001 From: Li Xiaoming Date: Sun, 22 Sep 2019 20:56:19 +0800 Subject: fix: Remove qml M126 warning Message: == and != may perform type coercion, use === or !== to avoid it. Description: The non-strict equality comparison is allowed to convert its arguments to a common type. That can lead to unexpected results such as ' \t\r\n' == 0 being true. Use the strict equality operators === and !== and be explicit about conversions you require. Bug-AGL: SPEC-2814 Change-Id: I4dd5848797f445d082242a5c5e2a0148ea790dc0 Signed-off-by: Li Xiaoming --- app/forms/RouteList.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/forms/RouteList.qml') diff --git a/app/forms/RouteList.qml b/app/forms/RouteList.qml index 27fa572..e37b581 100644 --- a/app/forms/RouteList.qml +++ b/app/forms/RouteList.qml @@ -79,8 +79,8 @@ ListView { } } //! [routeinfomodel2] - totalTravelTime = routeModel.count == 0 ? "" : Helper.formatTime(routeModel.get(0).travelTime) - totalDistance = routeModel.count == 0 ? "" : Helper.formatDistance(routeModel.get(0).distance) + totalTravelTime = routeModel.count === 0 ? "" : Helper.formatTime(routeModel.get(0).travelTime) + totalDistance = routeModel.count === 0 ? "" : Helper.formatDistance(routeModel.get(0).distance) } //! [routeinfomodel3] } -- cgit 1.2.3-korg