diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2022-11-25 16:11:57 +0800 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2022-11-28 10:10:43 +0800 |
commit | 0765c176e7b7ee73b1ac6d6efdabc93e4dec978f (patch) | |
tree | bb394880bb8b190a38a9688b9888e911fb4eda60 | |
parent | 20e745bbd80535bf09046e02920cd72fe7cec22c (diff) |
Fail on warnings for simple "default" controls tests
This patch:
- Adds a simple, "default-constructed" (i.e. little or no properties
set) test function for each control where one was missing.
- Causes those tests to fail on any warning.
It would be simpler to just call failOnWarnings(/.?/) in the
initTestCase() of each test, but there are too marning warnings to fix
right now.
Task-number: QTBUG-98718
Change-Id: Ia3aa901feab5db534925824528caf25297e02760
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
53 files changed, 307 insertions, 0 deletions
diff --git a/tests/auto/quickcontrols2/controls/data/tst_abstractbutton.qml b/tests/auto/quickcontrols2/controls/data/tst_abstractbutton.qml index 48168451fe..663b152c70 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_abstractbutton.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_abstractbutton.qml @@ -14,6 +14,12 @@ TestCase { name: "AbstractButton" Component { + id: defaultComponent + + AbstractButton {} + } + + Component { id: button AbstractButton { width: 100 @@ -36,6 +42,13 @@ TestCase { SignalSpy { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(defaultComponent, testCase) + verify(control) + } + function test_text() { var control = createTemporaryObject(button, testCase); verify(control); diff --git a/tests/auto/quickcontrols2/controls/data/tst_action.qml b/tests/auto/quickcontrols2/controls/data/tst_action.qml index 24810fa224..845a6507af 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_action.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_action.qml @@ -24,6 +24,13 @@ TestCase { SignalSpy { } } + function test_empty() { + failOnWarning(/.?/) + + let control = createTemporaryObject(component, testCase) + verify(control) + } + function test_enabled() { var action = createTemporaryObject(component, testCase) verify(action) diff --git a/tests/auto/quickcontrols2/controls/data/tst_actiongroup.qml b/tests/auto/quickcontrols2/controls/data/tst_actiongroup.qml index e2f4a3de39..4b5fdc7d65 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_actiongroup.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_actiongroup.qml @@ -51,6 +51,8 @@ TestCase { } function test_defaults() { + failOnWarning(/.?/) + var group = createTemporaryObject(actionGroup, testCase) verify(group) compare(group.actions.length, 0) diff --git a/tests/auto/quickcontrols2/controls/data/tst_busyindicator.qml b/tests/auto/quickcontrols2/controls/data/tst_busyindicator.qml index 7535717fd0..a50fd1bfab 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_busyindicator.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_busyindicator.qml @@ -23,6 +23,14 @@ TestCase { MouseArea { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(busyIndicator, testCase) + verify(control) + compare(control.running, true) + } + function test_running() { var control = createTemporaryObject(busyIndicator, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_button.qml b/tests/auto/quickcontrols2/controls/data/tst_button.qml index 9e74318115..9ddfa0885d 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_button.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_button.qml @@ -30,6 +30,15 @@ TestCase { SignalSpy { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(button, testCase) + verify(control) + compare(control.highlighted, false) + compare(control.flat, false) + } + function test_text() { var control = createTemporaryObject(button, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_buttongroup.qml b/tests/auto/quickcontrols2/controls/data/tst_buttongroup.qml index dd50b764ed..2ae86d1737 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_buttongroup.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_buttongroup.qml @@ -47,6 +47,8 @@ TestCase { } function test_defaults() { + failOnWarning(/.?/) + var group = createTemporaryObject(buttonGroup, testCase) verify(group) compare(group.buttons.length, 0) diff --git a/tests/auto/quickcontrols2/controls/data/tst_checkbox.qml b/tests/auto/quickcontrols2/controls/data/tst_checkbox.qml index 866fbe9361..5991ae9008 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_checkbox.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_checkbox.qml @@ -25,6 +25,15 @@ TestCase { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(checkBox, testCase) + verify(control) + compare(control.tristate, false) + compare(control.checkState, Qt.Unchecked) + } + function test_text() { var control = createTemporaryObject(checkBox, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_checkdelegate.qml b/tests/auto/quickcontrols2/controls/data/tst_checkdelegate.qml index 9b1a0be154..d3e0910e83 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_checkdelegate.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_checkdelegate.qml @@ -21,6 +21,8 @@ TestCase { // TODO: data-fy tst_checkbox (rename to tst_check?) so we don't duplicate its tests here? function test_defaults() { + failOnWarning(/.?/) + var control = createTemporaryObject(checkDelegate, testCase); verify(control); verify(!control.checked); diff --git a/tests/auto/quickcontrols2/controls/data/tst_combobox.qml b/tests/auto/quickcontrols2/controls/data/tst_combobox.qml index 0caefc0bb2..058a07a070 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_combobox.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_combobox.qml @@ -98,6 +98,8 @@ TestCase { } function test_defaults() { + failOnWarning(/.?/) + var control = createTemporaryObject(comboBox, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_container.qml b/tests/auto/quickcontrols2/controls/data/tst_container.qml index c6d14a700a..9988625744 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_container.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_container.qml @@ -24,6 +24,14 @@ TestCase { Rectangle { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(container, testCase) + verify(control) + compare(control.count, 0) + } + function test_implicitSize() { var control = createTemporaryObject(container, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_control.qml b/tests/auto/quickcontrols2/controls/data/tst_control.qml index 3fac27aff2..0747943421 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_control.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_control.qml @@ -34,6 +34,15 @@ TestCase { SignalSpy { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(component, testCase) + verify(control) + compare(control.background, null) + compare(control.contentItem, null) + } + function test_padding() { var control = createTemporaryObject(component, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_dayofweekrow.qml b/tests/auto/quickcontrols2/controls/data/tst_dayofweekrow.qml index e341e0eb2a..67403e240a 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_dayofweekrow.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_dayofweekrow.qml @@ -18,6 +18,13 @@ TestCase { DayOfWeekRow { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(component, testCase) + verify(control) + } + function test_locale() { var control = component.createObject(testCase) diff --git a/tests/auto/quickcontrols2/controls/data/tst_delaybutton.qml b/tests/auto/quickcontrols2/controls/data/tst_delaybutton.qml index 64e419ed16..e2abe389ca 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_delaybutton.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_delaybutton.qml @@ -14,6 +14,12 @@ TestCase { name: "DelayButton" Component { + id: defaultComponent + + DelayButton {} + } + + Component { id: delayButton DelayButton { delay: 200 @@ -32,6 +38,13 @@ TestCase { SignalSpy { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(defaultComponent, testCase) + verify(control) + } + function test_mouse() { var control = createTemporaryObject(delayButton, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_dial.qml b/tests/auto/quickcontrols2/controls/data/tst_dial.qml index 1836047dec..3fcf8c7e88 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_dial.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_dial.qml @@ -28,6 +28,8 @@ TestCase { } function test_instance() { + failOnWarning(/.?/) + var dial = createTemporaryObject(dialComponent, testCase); verify(dial); compare(dial.value, 0.0); diff --git a/tests/auto/quickcontrols2/controls/data/tst_dialog.qml b/tests/auto/quickcontrols2/controls/data/tst_dialog.qml index 6aa9d39af0..76ff95a32a 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_dialog.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_dialog.qml @@ -43,6 +43,8 @@ TestCase { } function test_defaults() { + failOnWarning(/.?/) + var control = createTemporaryObject(dialog, testCase) verify(control) verify(control.header) diff --git a/tests/auto/quickcontrols2/controls/data/tst_dialogbuttonbox.qml b/tests/auto/quickcontrols2/controls/data/tst_dialogbuttonbox.qml index ab5a53e1ce..6eb339a192 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_dialogbuttonbox.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_dialogbuttonbox.qml @@ -29,6 +29,8 @@ TestCase { } function test_defaults() { + failOnWarning(/.?/) + var control = createTemporaryObject(buttonBox, testCase) verify(control) compare(control.count, 0) diff --git a/tests/auto/quickcontrols2/controls/data/tst_frame.qml b/tests/auto/quickcontrols2/controls/data/tst_frame.qml index 150a76acac..bef46f7650 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_frame.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_frame.qml @@ -53,6 +53,8 @@ TestCase { } function test_empty() { + failOnWarning(/.?/) + var control = createTemporaryObject(frame, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_groupbox.qml b/tests/auto/quickcontrols2/controls/data/tst_groupbox.qml index b59c1bd7a3..b5867dd956 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_groupbox.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_groupbox.qml @@ -53,6 +53,8 @@ TestCase { } function test_empty() { + failOnWarning(/.?/) + var control = createTemporaryObject(groupBox, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_itemdelegate.qml b/tests/auto/quickcontrols2/controls/data/tst_itemdelegate.qml index a0a057f2eb..9d4847b4b1 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_itemdelegate.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_itemdelegate.qml @@ -18,6 +18,13 @@ TestCase { ItemDelegate { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(itemDelegate, testCase) + verify(control) + } + function test_baseline() { var control = createTemporaryObject(itemDelegate, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_label.qml b/tests/auto/quickcontrols2/controls/data/tst_label.qml index 6bbc7862b1..853d5ba686 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_label.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_label.qml @@ -36,6 +36,8 @@ TestCase { } function test_creation() { + failOnWarning(/.?/) + var control = createTemporaryObject(label, testCase) verify(control) } diff --git a/tests/auto/quickcontrols2/controls/data/tst_menuitem.qml b/tests/auto/quickcontrols2/controls/data/tst_menuitem.qml index 183f3e1d4c..d1ed076705 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_menuitem.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_menuitem.qml @@ -23,6 +23,13 @@ TestCase { Menu { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(menuItem, testCase) + verify(control) + } + function test_baseline() { var control = createTemporaryObject(menuItem, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_monthgrid.qml b/tests/auto/quickcontrols2/controls/data/tst_monthgrid.qml index 344677e925..5b1081675e 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_monthgrid.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_monthgrid.qml @@ -37,6 +37,13 @@ TestCase { SignalSpy { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(defaultGrid, testCase) + verify(control) + } + function test_locale() { var control = delegateGrid.createObject(testCase, {month: 0, year: 2013}) diff --git a/tests/auto/quickcontrols2/controls/data/tst_page.qml b/tests/auto/quickcontrols2/controls/data/tst_page.qml index 17206bf8b0..ca816d963b 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_page.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_page.qml @@ -70,6 +70,8 @@ TestCase { } function test_defaults() { + failOnWarning(/.?/) + var control = createTemporaryObject(page, testCase) verify(control) @@ -79,6 +81,8 @@ TestCase { } function test_empty() { + failOnWarning(/.?/) + var control = createTemporaryObject(page, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_pageindicator.qml b/tests/auto/quickcontrols2/controls/data/tst_pageindicator.qml index b45cbf2205..837972cdc2 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_pageindicator.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_pageindicator.qml @@ -23,6 +23,13 @@ TestCase { MouseArea { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(pageIndicator, testCase) + verify(control) + } + function test_count() { var control = createTemporaryObject(pageIndicator, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_pane.qml b/tests/auto/quickcontrols2/controls/data/tst_pane.qml index 4591e780b4..f823031c79 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_pane.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_pane.qml @@ -66,6 +66,8 @@ TestCase { } function test_empty() { + failOnWarning(/.?/) + var control = createTemporaryObject(pane, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_popup.qml b/tests/auto/quickcontrols2/controls/data/tst_popup.qml index 278ee62f06..9c1d63ffe4 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_popup.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_popup.qml @@ -42,6 +42,13 @@ TestCase { SignalSpy { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(popupControl, testCase) + verify(control) + } + function test_padding() { var control = createTemporaryObject(popupTemplate, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_progressbar.qml b/tests/auto/quickcontrols2/controls/data/tst_progressbar.qml index 1e9b1a7838..6484df815a 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_progressbar.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_progressbar.qml @@ -18,6 +18,13 @@ TestCase { ProgressBar { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(progressBar, testCase) + verify(control) + } + function test_value() { var control = createTemporaryObject(progressBar, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_radiobutton.qml b/tests/auto/quickcontrols2/controls/data/tst_radiobutton.qml index d2a42565f6..08caac977d 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_radiobutton.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_radiobutton.qml @@ -25,6 +25,13 @@ TestCase { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(radioButton, testCase) + verify(control) + } + function test_text() { var control = createTemporaryObject(radioButton, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_radiodelegate.qml b/tests/auto/quickcontrols2/controls/data/tst_radiodelegate.qml index 15fe80c2c8..fe89838bda 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_radiodelegate.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_radiodelegate.qml @@ -21,6 +21,8 @@ TestCase { // TODO: data-fy tst_radiobutton (rename to tst_radio?) so we don't duplicate its tests here? function test_defaults() { + failOnWarning(/.?/) + var control = createTemporaryObject(radioDelegate, testCase); verify(control); verify(!control.checked); diff --git a/tests/auto/quickcontrols2/controls/data/tst_rangeslider.qml b/tests/auto/quickcontrols2/controls/data/tst_rangeslider.qml index 82e5a732b9..91e366c819 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_rangeslider.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_rangeslider.qml @@ -43,6 +43,8 @@ TestCase { } function test_defaults() { + failOnWarning(/.?/) + var control = createTemporaryObject(sliderComponent, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_roundbutton.qml b/tests/auto/quickcontrols2/controls/data/tst_roundbutton.qml index 1f6a218e7b..dfdd62086d 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_roundbutton.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_roundbutton.qml @@ -18,6 +18,13 @@ TestCase { RoundButton { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(roundButton, testCase) + verify(control) + } + function test_radius() { var control = createTemporaryObject(roundButton, testCase); verify(control); diff --git a/tests/auto/quickcontrols2/controls/data/tst_scrollbar.qml b/tests/auto/quickcontrols2/controls/data/tst_scrollbar.qml index fff44cf6db..f26d8f5cb0 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_scrollbar.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_scrollbar.qml @@ -20,6 +20,12 @@ TestCase { } Component { + id: defaultScrollBar + + ScrollBar {} + } + + Component { id: scrollBar ScrollBar { padding: 0 @@ -46,6 +52,13 @@ TestCase { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(defaultScrollBar, testCase) + verify(control) + } + function test_attach() { var container = createTemporaryObject(flickable, testCase) verify(container) diff --git a/tests/auto/quickcontrols2/controls/data/tst_scrollindicator.qml b/tests/auto/quickcontrols2/controls/data/tst_scrollindicator.qml index d052eacf30..d87e29f980 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_scrollindicator.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_scrollindicator.qml @@ -35,6 +35,13 @@ TestCase { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(scrollIndicator, testCase) + verify(control) + } + function test_attach() { var container = createTemporaryObject(flickable, testCase) verify(container) diff --git a/tests/auto/quickcontrols2/controls/data/tst_scrollview.qml b/tests/auto/quickcontrols2/controls/data/tst_scrollview.qml index 1ab2475c45..e5600830a8 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_scrollview.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_scrollview.qml @@ -156,6 +156,13 @@ TestCase { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(scrollView, testCase) + verify(control) + } + function test_scrollBars() { var control = createTemporaryObject(scrollView, testCase, {width: 200, height: 200}) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_selectionrectangle.qml b/tests/auto/quickcontrols2/controls/data/tst_selectionrectangle.qml index f6b9428f9d..9203528d07 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_selectionrectangle.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_selectionrectangle.qml @@ -20,6 +20,12 @@ TestCase { property bool handleWasDragged: false Component { + id: defaultSelectionRectangle + + SelectionRectangle {} + } + + Component { id: handleComp Rectangle { id: handle @@ -87,6 +93,13 @@ TestCase { SignalSpy { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(defaultSelectionRectangle, testCase) + verify(control) + } + function test_set_target() { let tableView = createTemporaryObject(tableviewComp, testCase) verify(tableView) diff --git a/tests/auto/quickcontrols2/controls/data/tst_slider.qml b/tests/auto/quickcontrols2/controls/data/tst_slider.qml index 6befb61aa8..df3eb71ae2 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_slider.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_slider.qml @@ -24,6 +24,8 @@ TestCase { } function test_defaults() { + failOnWarning(/.?/) + var control = createTemporaryObject(slider, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_spinbox.qml b/tests/auto/quickcontrols2/controls/data/tst_spinbox.qml index 71fd8b2754..df30ef4beb 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_spinbox.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_spinbox.qml @@ -30,6 +30,8 @@ TestCase { } function test_defaults() { + failOnWarning(/.?/) + var control = createTemporaryObject(spinBox, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_splitview.qml b/tests/auto/quickcontrols2/controls/data/tst_splitview.qml index 8d9c1dcc81..2cdd28457f 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_splitview.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_splitview.qml @@ -112,6 +112,12 @@ TestCase { } Component { + id: defaultSplitView + + SplitView {} + } + + Component { id: splitViewComponent SplitView { @@ -126,6 +132,13 @@ TestCase { Rectangle {} } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(defaultSplitView, testCase) + verify(control) + } + function test_addItemsAfterCompletion() { var control = createTemporaryObject(splitViewComponent, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_stackview.qml b/tests/auto/quickcontrols2/controls/data/tst_stackview.qml index 901c9609a0..8584385cbf 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_stackview.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_stackview.qml @@ -30,6 +30,13 @@ TestCase { Component { id: withRequired; Item { required property int i }} + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(stackView, testCase) + verify(control) + } + function test_initialItem() { var control1 = createTemporaryObject(stackView, testCase) verify(control1) diff --git a/tests/auto/quickcontrols2/controls/data/tst_swipedelegate.qml b/tests/auto/quickcontrols2/controls/data/tst_swipedelegate.qml index 77204015b7..901170bf9f 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_swipedelegate.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_swipedelegate.qml @@ -244,6 +244,8 @@ TestCase { } function test_defaults() { + failOnWarning(/.?/) + var control = createTemporaryObject(swipeDelegateComponent, testCase); verify(control); diff --git a/tests/auto/quickcontrols2/controls/data/tst_swipeview.qml b/tests/auto/quickcontrols2/controls/data/tst_swipeview.qml index 779107722d..c853f6dd55 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_swipeview.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_swipeview.qml @@ -28,6 +28,13 @@ TestCase { SignalSpy { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(swipeView, testCase) + verify(control) + } + function test_current() { var control = createTemporaryObject(swipeView, testCase) diff --git a/tests/auto/quickcontrols2/controls/data/tst_switch.qml b/tests/auto/quickcontrols2/controls/data/tst_switch.qml index 70a6f10204..407513b914 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_switch.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_switch.qml @@ -25,6 +25,13 @@ TestCase { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(swtch, testCase) + verify(control) + } + function test_text() { var control = createTemporaryObject(swtch, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_switchdelegate.qml b/tests/auto/quickcontrols2/controls/data/tst_switchdelegate.qml index 33cf78c531..42d58b9668 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_switchdelegate.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_switchdelegate.qml @@ -28,6 +28,8 @@ TestCase { // TODO: data-fy tst_checkbox (rename to tst_check?) so we don't duplicate its tests here? function test_defaults() { + failOnWarning(/.?/) + var control = createTemporaryObject(switchDelegate, testCase); verify(control); verify(!control.checked); diff --git a/tests/auto/quickcontrols2/controls/data/tst_tabbar.qml b/tests/auto/quickcontrols2/controls/data/tst_tabbar.qml index 97fb492839..58c0b1ae61 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_tabbar.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_tabbar.qml @@ -54,6 +54,8 @@ TestCase { } function test_defaults() { + failOnWarning(/.?/) + var control = createTemporaryObject(tabBar, testCase) verify(control) compare(control.count, 0) diff --git a/tests/auto/quickcontrols2/controls/data/tst_tabbutton.qml b/tests/auto/quickcontrols2/controls/data/tst_tabbutton.qml index a4774bd5ca..591622b8a2 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_tabbutton.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_tabbutton.qml @@ -28,6 +28,13 @@ TestCase { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(tabButton, testCase) + verify(control) + } + function test_autoExclusive() { var container = createTemporaryObject(repeater, testCase) diff --git a/tests/auto/quickcontrols2/controls/data/tst_textarea.qml b/tests/auto/quickcontrols2/controls/data/tst_textarea.qml index b2fd348db2..0f295905f1 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_textarea.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_textarea.qml @@ -69,6 +69,8 @@ TestCase { } function test_creation() { + failOnWarning(/.?/) + var control = createTemporaryObject(textArea, testCase) verify(control) } diff --git a/tests/auto/quickcontrols2/controls/data/tst_textfield.qml b/tests/auto/quickcontrols2/controls/data/tst_textfield.qml index ecda6c25b5..f5b3d91fe1 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_textfield.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_textfield.qml @@ -30,6 +30,8 @@ TestCase { } function test_creation() { + failOnWarning(/.?/) + var control = createTemporaryObject(textField, testCase) verify(control) } diff --git a/tests/auto/quickcontrols2/controls/data/tst_toolbar.qml b/tests/auto/quickcontrols2/controls/data/tst_toolbar.qml index 1d7064be14..d2c9e4a20d 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_toolbar.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_toolbar.qml @@ -53,6 +53,8 @@ TestCase { } function test_empty() { + failOnWarning(/.?/) + var control = createTemporaryObject(toolBar, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_toolbutton.qml b/tests/auto/quickcontrols2/controls/data/tst_toolbutton.qml index 4658570a8f..4879e91611 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_toolbutton.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_toolbutton.qml @@ -23,6 +23,13 @@ TestCase { ToolButton { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(toolButton, testCase) + verify(control) + } + function test_text() { var control = createTemporaryObject(toolButton, testCase) verify(control) diff --git a/tests/auto/quickcontrols2/controls/data/tst_toolseparator.qml b/tests/auto/quickcontrols2/controls/data/tst_toolseparator.qml index 1ac7da12ca..ef7fc35758 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_toolseparator.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_toolseparator.qml @@ -17,6 +17,13 @@ TestCase { ToolSeparator {} } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(toolSeparator, testCase) + verify(control) + } + function test_size() { var control = createTemporaryObject(toolSeparator, testCase); verify(control); diff --git a/tests/auto/quickcontrols2/controls/data/tst_tooltip.qml b/tests/auto/quickcontrols2/controls/data/tst_tooltip.qml index 9874988c44..1aa63e56a2 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_tooltip.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_tooltip.qml @@ -37,6 +37,13 @@ TestCase { target: ToolTip.toolTip } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(toolTip, testCase) + verify(control) + } + function test_properties_data() { return [ {tag: "text", property: "text", defaultValue: "", setValue: "Hello", signalName: "textChanged"}, diff --git a/tests/auto/quickcontrols2/controls/data/tst_tumbler.qml b/tests/auto/quickcontrols2/controls/data/tst_tumbler.qml index a705ced858..bb098f92db 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_tumbler.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_tumbler.qml @@ -22,6 +22,12 @@ TestCase { property Item tumblerView: null Component { + id: defaultTumbler + + Tumbler {} + } + + Component { id: tumblerComponent Tumbler { @@ -107,6 +113,13 @@ TestCase { text: modelData } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(defaultTumbler, testCase) + verify(control) + } + function test_wrapWithoutAttachedProperties() { createTumbler(); verify(tumbler.wrap); diff --git a/tests/auto/quickcontrols2/controls/data/tst_weeknumbercolumn.qml b/tests/auto/quickcontrols2/controls/data/tst_weeknumbercolumn.qml index 54e95316d6..40566b018c 100644 --- a/tests/auto/quickcontrols2/controls/data/tst_weeknumbercolumn.qml +++ b/tests/auto/quickcontrols2/controls/data/tst_weeknumbercolumn.qml @@ -18,6 +18,13 @@ TestCase { WeekNumberColumn { } } + function test_defaults() { + failOnWarning(/.?/) + + let control = createTemporaryObject(component, testCase) + verify(control) + } + function test_locale() { var control = component.createObject(testCase) |