Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
-
6c1f57cc8 (dev), 6365c9e14 (6.6), 1465d428e (6.5), 44bf048c9 (dev), eaafda38d (6.6), 131c976b8 (6.5), 80b7d0cfb (dev), 264fe7d68 (6.6), 821aa3dcc (tqtc/lts-6.5), 71b62a4e5 (dev), 0625712e7 (6.6), a22a8ed91 (tqtc/lts-6.5), c2fa37c42 (dev), 27efcaa34 (dev)
Description
Now that https://codereview.qt-project.org/c/qt/qtbase/+/375915 is merged, we can start preventing new warnings from creeping into qtdeclarative.
My proposal is to do this in tests that aren't based on QQmlDataTest:
void QQmlDataTest::init()
{
QTest::failOnWarning(QRegularExpression(QStringLiteral(".?")));
}
and this in the constructor of those that are:
// ...
: QQmlDataTest(QT_QMLTEST_DATADIR, FailOnWarningsPolicy::FailOnWarnings)
{
}
This would make every QQmlDataTest-based test function in qtdeclarative fail if a qWarning is encountered. It would require a bit of work up front: a few tests would probably require a bunch of QTest::ignoreMessages, and QTBUG-98439 would need to be fixed first.
In addition, we should add a bool failOnWarnings to TestCase, defaulting it to the value of QT_QUICK_TEST_FAIL_ON_WARNINGS if it is set, otherwise false. This will allow us to enable it for all QML tests in the least disruptive way.
This won't cover every test, but it's a good start.
Attachments
Issue Links
- depends on
-
QTBUG-99231 "Could not set initial property horizontalAlignment" when trying to set resettable property
- Reported
-
QTBUG-98439 "Binding on contentItem is not deferred as requested by the DeferredPropertyNames class info because it constitutes a group property" when instantiating ScrollBar
- Closed
-
QTBUG-119572 [Tests] Warnings in tst_controls::Imagine::RangeSlider::test_nullHandles()
- Closed
-
QTBUG-119573 [Tests] Warning in tst_controls::Imagine::Popup::test_popupOverlayCenterIn()
- Closed
-
QTBUG-119633 [Tests] Warnings in qtdeclarative/tests/auto/quickcontrols/controls/data/tst_slider.qml
- Closed
-
QTBUG-119644 [Tests] Warnings in qtdeclarative/tests/auto/quickcontrols/controls/data/tst_combobox.qml
- Closed
-
QTBUG-119645 [Tests] Warnings in qtdeclarative/tests/auto/quickcontrols/controls/data/tst_textarea.qml
- Closed
-
QTBUG-119646 [Tests] Warnings in qtdeclarative/tests/auto/quickcontrols/controls/data/tst_textfield.qml
- Closed
-
QTBUG-119647 [Tests] Warnings in qtdeclarative/tests/auto/quickcontrols/controls/data/tst_tumbler.qml
- Closed
-
QTBUG-119756 [Tests] Warnings in tst_controls::macOS::SpinBox
- Closed
-
QTBUG-124201 [Tests] Warnings in tst_controls::Windows::SpinBox
- Closed
-
QTBUG-124275 [Tests] Warnings in tst_controls::iOS::RangeSlider
- Closed
-
QTBUG-124290 [Tests] Warnings in tst_controls::iOS::Slider
- Closed
-
QTBUG-125580 [Tests] Warnings in tst_controls::Material::ComboBox::test_comboBoxWithShaderEffect()
- Closed
- is blocked by
-
QTBUG-104778 No MTLDevice warning in some auto tests
- Closed
- relates to
-
QTBUG-70029 Provide API to fail a test if a warning occurs
- Closed