on xenial help sign in
Return null instead of undefined from findChild and findInvisibleChild.
09de2edMichał Sawicz
tests/qmltests/Greeter/tst_Lockscreen.qml+1−1
@@ -134,7 +134,7 @@ Rectangle {
134 if (data.pinPadAvailable) {
134 if (data.pinPadAvailable) {
135 compare(findChild(lockscreen, "pinPadButton8").text, "8", "Could not find number 8 on PinPad")
135 compare(findChild(lockscreen, "pinPadButton8").text, "8", "Could not find number 8 on PinPad")
136 } else {
136 } else {
137− compare(findChild(lockscreen, "pinPadButton8"), undefined, "Could find number 8 on PinPad even though it should be only OSK")
137+ compare(findChild(lockscreen, "pinPadButton8"), null, "Could find number 8 on PinPad even though it should be only OSK")
138 }
138 }
139 }
139 }
140
140
tests/qmltests/Panel/tst_Indicators.qml+1−1
@@ -175,7 +175,7 @@ Item {
175 tryCompare(indicatorItem, "visible", data.visible);
175 tryCompare(indicatorItem, "visible", data.visible);
176
176
177 var indicatorTab = findChild(indicatorTabs, data.name)
177 var indicatorTab = findChild(indicatorTabs, data.name)
178− tryCompareFunction(function() { return indicatorTab !== undefined }, data.visible);
178+ tryCompareFunction(function() { return indicatorTab !== null }, data.visible);
179 }
179 }
180 }
180 }
181}
181}
tests/utils/modules/Unity/Test/UnityTestCase.qml+2−2
@@ -83,7 +83,7 @@ TestCase {
83 }
83 }
84 childs.splice(0, 1);
84 childs.splice(0, 1);
85 }
85 }
86− return undefined;
86+ return null;
87 }
87 }
88
88
89 // Find an object with the given name in the children tree of "obj"
89 // Find an object with the given name in the children tree of "obj"
@@ -103,7 +103,7 @@ TestCase {
103 }
103 }
104 childs.splice(0, 1);
104 childs.splice(0, 1);
105 }
105 }
106− return undefined;
106+ return null;
107 }
107 }
108
108
109 // Type a full string instead of keyClick letter by letter
109 // Type a full string instead of keyClick letter by letter