Return null instead of undefined from findChild and findInvisibleChild.
Approved by PS Jenkins bot, Albert Astals Cid.
commit09de2edf039e5a9edfd0015f6f17d492d9e700c0
authorMichał Sawicz <michal.sawicz@canonical.com>
dateWed 15 Jan 2014, 09:49 (13 years ago)
parentc88c02ec5fb681
tests/qmltests/Greeter/tst_Lockscreen.qml+1−1
@@ -134,7 +134,7 @@ Rectangle {
134134 if (data.pinPadAvailable) {
135135 compare(findChild(lockscreen, "pinPadButton8").text, "8", "Could not find number 8 on PinPad")
136136 } 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")
138138 }
139139 }
140140
tests/qmltests/Panel/tst_Indicators.qml+1−1
@@ -175,7 +175,7 @@ Item {
175175 tryCompare(indicatorItem, "visible", data.visible);
176176
177177 var indicatorTab = findChild(indicatorTabs, data.name)
178− tryCompareFunction(function() { return indicatorTab !== undefined }, data.visible);
178+ tryCompareFunction(function() { return indicatorTab !== null }, data.visible);
179179 }
180180 }
181181}
tests/utils/modules/Unity/Test/UnityTestCase.qml+2−2
@@ -83,7 +83,7 @@ TestCase {
8383 }
8484 childs.splice(0, 1);
8585 }
86− return undefined;
86+ return null;
8787 }
8888
8989 // Find an object with the given name in the children tree of "obj"
@@ -103,7 +103,7 @@ TestCase {
103103 }
104104 childs.splice(0, 1);
105105 }
106− return undefined;
106+ return null;
107107 }
108108
109109 // Type a full string instead of keyClick letter by letter