on xenial help sign in
TIme out findChild faster when we expect null

The default timeout for findChild is 5 seconds. This timeout is reached whenever the child is not found in the requested parent. If we expect the child to be null anyway, we don't need to wait that long. 1 second is plenty of time to search the small children area of 'dialogs' anyway. This saves about 40 seconds on my unloaded Ryzen 7 1700.

commitb0f054c18d3e0b99988828410f1bac953a4bb741 authorDalton Durst <dalton@ubports.com> dateFri 13 Dec 2019, 17:16 (7 years ago) parent7f2de6d
1 file changed+3−3
tests/qmltests/tst_Shell.qml+3−3
tests/qmltests/tst_Shell.qml+3−3
@@ -2134,7 +2134,7 @@ Rectangle {
21342134 waitForRendering(shell);
21352135
21362136 // No legacy app running yet... Popup must *not* show.
2137− var popup = findChild(dialogs, "modeSwitchWarningDialog");
2137+ var popup = findChild(dialogs, "modeSwitchWarningDialog", 1000);
21382138 compare(popup, null);
21392139
21402140 shell.usageScenario = "desktop"
@@ -2147,7 +2147,7 @@ Rectangle {
21472147 waitForRendering(shell);
21482148
21492149 // The popup must appear now, unless in "tablet" mode
2150− popup = findChild(dialogs, "modeSwitchWarningDialog");
2150+ popup = findChild(dialogs, "modeSwitchWarningDialog", 1000);
21512151 if (data.tabletMode) {
21522152 verify(!popup);
21532153 } else {
@@ -2164,7 +2164,7 @@ Rectangle {
21642164 }
21652165
21662166 // Popup must be gone now
2167− popup = findChild(dialogs, "modeSwitchWarningDialog");
2167+ popup = findChild(dialogs, "modeSwitchWarningDialog", 1000);
21682168 tryCompareFunction(function() { return popup === null}, true);
21692169
21702170 if (data.replug || data.tabletMode) {