summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2022-12-02 17:53:27 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2022-12-05 04:15:39 +0100
commiteb63f2eb0522531d133e96707f828dfc686698f4 (patch)
tree6c785847e2fe9bde2336bdca75aac21c09348257 /tests/auto/gui/text
parent33e682f9af81902b36afa1aef1c4ecdcd2ed95a2 (diff)
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>
Diffstat (limited to 'tests/auto/gui/text')
0 files changed, 0 insertions, 0 deletions