qt5base-lts/tests/auto/corelib
Giuseppe D'Angelo eb63f2eb05 QMessageLogger: make qFatal categorized and streamable
There is no technical reason why qFatal shouldn't support categorized
logging, nor have a streaming version.

There is perhaps an API issue, that is, a streaming syntax may encourage
users to do "too much":

  qFatal() << gatherLogs() << saveDatabase() << ...;

and that sounds like a bad idea in case the application is in an
unrecoverable state that requires immedate terminatation (indeed,
through qFatal). I'd err on the side of providing the extra convenience.

This commits adds overloads of QMessageLogger::fatal to support
categorized logging (note that fatal messages cannot be disabled),
the relative qCFatal macro, as well as overloads for streaming.

[ChangeLog][QtCore][QMessageLogger] QMessageLogger::fatal now supports
categorized logging, for instance using the qCFatal(category) macro.
Moreover, qFatal() and qCFatal() now support streaming of values
to be printed in the fatal message.

Change-Id: Ia57f25f5c85fca97e5fcf27eaa760dbde09cba0e
Fixes: QTBUG-8298
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-05 04:15:39 +01:00
..
animation Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
global qfloat16: make it a built-in metatype 2022-11-28 10:59:35 -08:00
io QMessageLogger: make qFatal categorized and streamable 2022-12-05 04:15:39 +01:00
itemmodels Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
kernel QBindable: Make ordinary Q_PROPERTYs bindable 2022-11-30 21:21:03 +00:00
mimetypes Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
platform Android: Fix incorrect fullscreen dimensions 2022-11-07 09:06:34 +00:00
plugin Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
serialization Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
text QString::fromLatin1: improve the sub-16-character case 2022-12-04 17:56:45 -08:00
thread tests: fix build with -no-feature-concurrent 2022-11-09 20:33:49 +01:00
time Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
tools ContainerApiSymmetry: verify Qt containers member erase returns iterator 2022-12-02 21:53:02 +02:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00