Thiago Macieira 0381e77205 QMessageLogger: reject negative values for QT_FATAL_xxx
Amends ceb859bf036dfdd1c54eec403006eac62a0d09b8

We'd accept negative values and keep counting downwards, reaching 0
again only after a full underflow[*]. Effectively, this meant that a
negative value was the same as zero, so this makes the behavior
explicit. The commit introducing checked_var_value() said in its
changelog:

 For compatibility reasons with previous
 versions, if the variable is set to any non-empty and non-numeric value
 different from 0, Qt will understand as "stop on first warning".

Negative values are not "non-empty and non-numeric", so this commit
chooses to make the current behavior explicit.

[*] atomic under- and overflows are defined behavior, but only if the
atomic operation is the one producing it. The current code is doing the
subtraction by itself in the call to testAndSetRelaxed(), so underflows
are still UB. If/when this is replaced by atomicMutate, that might
change (and note to self when implementing that!).

Pick-to: 6.8
Change-Id: I594ed31f1cc7fc04ea98c6e86bdcaa3a4aa59114
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit c8ecd0eb22d5f2578439b8fed4db8879a91cb026)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-27 12:41:40 +00:00
2025-03-24 18:27:25 +00:00
2024-11-05 14:36:16 +01:00
2015-08-18 19:59:14 +00:00
2024-11-05 14:36:16 +01:00
2025-03-25 08:40:27 +00:00
2024-06-25 11:44:00 +02:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%