qt5base-lts/tests/auto
Tor Arne Vestbø fa8cffa4c9 testlib: Pass on file location on failure, but don't assume we have one
We try our best to pass on the file location of a failure, including for
fatal errors, but the reporting or logging machinery should not assume
there is one.

By passing on nullptr for the file location we allow the logging backends
to decide how to handle the situation, e.g. by not emitting extra fields
for failure location.

This effectively reverts c25687fa0b,
in favor of relying on the backends to cope with null filename,
which they already did.

As qFatal uses QMessageLogger, which by default disables file/line
information in release builds, we need to explicitly enable this in
our self-tests, to get uniform test results. Similarly, we disable
file/line info from testlib itself, as reporting Qt internal file
and line information for user diagnostics is less useful. The odd
one out there is qtestdata.cpp, which still ends up in test output
due to using QTEST_ASSERT instead of qFatal for its diagnostics.
Cleaning up that, and unifying how we report testlib issues to the
user, is left for another day.

Pick-to: 6.2
Change-Id: Ib9451b8eed86fe3ade4a4dcaf0037e1a3450321c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-08-04 17:31:51 +00:00
..
bic/data Add binary compatibility files for Qt 6.0.0 2021-04-08 06:34:13 +00:00
cmake CMake: Disable test_QT_TESTCASE_BUILDDIR cmake build test 2021-07-22 15:56:37 +02:00
concurrent Fix QtConcurrent to properly work with functors 2021-07-21 09:46:33 +02:00
corelib testlib: Deprecate QWARN() in favor of qWarning() 2021-08-04 19:31:51 +02:00
dbus Port QDBusServiceWatcher::watchedServices to bindable properties 2021-04-28 16:59:53 +02:00
gui testlib: Deprecate QWARN() in favor of qWarning() 2021-08-04 19:31:51 +02:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network testlib: Deprecate QWARN() in favor of qWarning() 2021-08-04 19:31:51 +02:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other testlib: Deprecate QWARN() in favor of qWarning() 2021-08-04 19:31:51 +02:00
printsupport Remove the qmake project files 2021-01-07 15:32:28 +01:00
shared Remove false Q_UNREACHABLE from shaping code 2021-02-03 09:44:44 +01:00
sql testlib: Deprecate QWARN() in favor of qWarning() 2021-08-04 19:31:51 +02:00
testlib testlib: Pass on file location on failure, but don't assume we have one 2021-08-04 17:31:51 +00:00
tools testlib: Deprecate QWARN() in favor of qWarning() 2021-08-04 19:31:51 +02:00
widgets testlib: Deprecate QWARN() in favor of qWarning() 2021-08-04 19:31:51 +02:00
xml tst_qdom: clean-up the code enabled only before Qt 6 2021-01-15 15:22:08 +01:00
CMakeLists.txt CMake: Build minimal subset of tests in desktop static builds 2021-04-06 09:15:37 +01:00
network-settings.h Replace QtTest headers with QTest 2020-12-22 15:20:30 +01:00