[PATCH 3/3] Avoid QtCreator warning about ==

subsurface at henrik.synth.no subsurface at henrik.synth.no
Sun Feb 7 13:23:08 PST 2016


From: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>

Warning M126: == and != may perform type coercion, use === or !== to avoid it

Signed-off-by: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>
---
 qt-mobile/qml/DiveList.qml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml
index 1429d67..13cc104 100644
--- a/qt-mobile/qml/DiveList.qml
+++ b/qt-mobile/qml/DiveList.qml
@@ -15,7 +15,7 @@ MobileComponents.Page {
 		id: diveDelegate
 		MobileComponents.ListItem {
 			enabled: true
-			checked: diveListView.currentIndex == model.index
+			checked: diveListView.currentIndex === model.index
 			width: parent.width
 
 			property real detailsOpacity : 0
@@ -145,7 +145,7 @@ MobileComponents.Page {
 	Connections {
 		target: stackView
 		onDepthChanged: {
-			if (stackView.depth == 1) {
+			if (stackView.depth === 1) {
 				diveListView.currentIndex = -1;
 			}
 		}
-- 
2.7.0



More information about the subsurface mailing list