diff options
| author | Mitch Curtis <mitch.curtis@qt.io> | 2022-06-07 10:23:31 +0800 |
|---|---|---|
| committer | Mitch Curtis <mitch.curtis@qt.io> | 2022-07-05 14:34:37 +0800 |
| commit | 234afb5502ab20b4f58ddd9b01a4245330a7e5a4 (patch) | |
| tree | 44f3bea37e8fd6abddf5f7d26095373c7dd0b44f /tests/auto/qml/debugger/shared/debugutil.cpp | |
| parent | 7112b4e0cc9b7625288d0464c02d92390ab0f193 (diff) | |
Add convenience API for making QQmlDataTest-based tests fail on warnings
After this patch, if a QQmlDataTest-derived class passes
FailOnWarningsPolicy::FailOnWarnings to the base constructor, any
non-empty warning encountered by that test will result in a test
failure.
This avoids the need to duplicate the catch-all regex in tests that
want to fail on warnings.
The goal is to gradually enable failure-on-warnings over time.
Leave comments and explicitly pass DoNotFailOnWarnings for tests that
should never fail on warnings.
Task-number: QTBUG-98718
Pick-to: 6.2 6.3 6.4
Change-Id: I4b647d93a0f28ac891c4bdb19ef74569f2918e8f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/debugger/shared/debugutil.cpp')
| -rw-r--r-- | tests/auto/qml/debugger/shared/debugutil.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qml/debugger/shared/debugutil.cpp b/tests/auto/qml/debugger/shared/debugutil.cpp index 97b573fb07..bc15af706d 100644 --- a/tests/auto/qml/debugger/shared/debugutil.cpp +++ b/tests/auto/qml/debugger/shared/debugutil.cpp @@ -10,8 +10,8 @@ #include <QtTest/qtest.h> #include <QtTest/qsignalspy.h> -QQmlDebugTest::QQmlDebugTest(const char *qmlTestDataDir) - : QQmlDataTest(qmlTestDataDir) +QQmlDebugTest::QQmlDebugTest(const char *qmlTestDataDir, FailOnWarningsPolicy failOnWarningsPolicy) + : QQmlDataTest(qmlTestDataDir, failOnWarningsPolicy) { } |
