From 4448a13f05e2db3f4c743a724554752ec6f6edbe Mon Sep 17 00:00:00 2001 From: Vladimir Belyavsky Date: Mon, 20 Nov 2023 20:48:41 +0300 Subject: [PATCH] tst_busyindicator: fail on warnings Enable fail on warnings for all tests in init() method. Also, as a drive-by change, replace 'var' with 'let' Task-number: QTBUG-98718 Change-Id: I04f16ce3e3cc383ce35cab12b8fdc7e2108587eb Reviewed-by: Mitch Curtis (cherry picked from commit 27efcaa34588fc4372577dd6558a9fd017244e89) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit af939b37430b2feca02f5c9e28cd47892cd21c71) --- .../controls/data/tst_busyindicator.qml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/auto/quickcontrols/controls/data/tst_busyindicator.qml b/tests/auto/quickcontrols/controls/data/tst_busyindicator.qml index a50fd1bfab..7385677f93 100644 --- a/tests/auto/quickcontrols/controls/data/tst_busyindicator.qml +++ b/tests/auto/quickcontrols/controls/data/tst_busyindicator.qml @@ -23,16 +23,18 @@ TestCase { MouseArea { } } - function test_defaults() { + function init() { failOnWarning(/.?/) + } + function test_defaults() { let control = createTemporaryObject(busyIndicator, testCase) verify(control) compare(control.running, true) } function test_running() { - var control = createTemporaryObject(busyIndicator, testCase) + let control = createTemporaryObject(busyIndicator, testCase) verify(control) compare(control.running, true) @@ -42,10 +44,10 @@ TestCase { // QTBUG-61785 function test_mouseArea() { - var ma = createTemporaryObject(mouseArea, testCase, {width: testCase.width, height: testCase.height}) + let ma = createTemporaryObject(mouseArea, testCase, {width: testCase.width, height: testCase.height}) verify(ma) - var control = busyIndicator.createObject(ma, {width: testCase.width, height: testCase.height}) + let control = busyIndicator.createObject(ma, {width: testCase.width, height: testCase.height}) verify(control) mousePress(control) @@ -54,7 +56,7 @@ TestCase { mouseRelease(control) verify(!ma.pressed) - var touch = touchEvent(control) + let touch = touchEvent(control) touch.press(0, control).commit() verify(ma.pressed)