fix(IconItem.qml): Remove qml M126 warning 29/22529/1 8.99.1 icefish/8.99.1 icefish_8.99.1
authorLi Xiaoming <lixm.fnst@cn.fujitsu.com>
Fri, 27 Sep 2019 12:02:10 +0000 (20:02 +0800)
committerLi Xiaoming <lixm.fnst@cn.fujitsu.com>
Fri, 27 Sep 2019 12:02:10 +0000 (20:02 +0800)
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: I96de9ecace7ea519946c0df739db9753d44d2dfd
Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
launcher/qml/IconItem.qml

index c15a3da..5adbe81 100644 (file)
@@ -97,7 +97,7 @@ Item {
         states: [
             State {
                 name: 'active'
-                when: loc.currentId == model.id
+                when: loc.currentId === model.id
                 PropertyChanges {
                     target: container
                     x: loc.mouseX - width/2