Thiago Macieira 9883f88850 QDebug: cast the QFlags value to the right-sized unsigned type (1/2)
This change fixes three problems in the non-Q_ENUM overload. First, the
printing of the sign bit for a signed flag. This is correct, but
unexpected:
  QFlags(0x1|0x2|-0x80000000)
By using unsigned types, we'll print instead:
  QFlags(0x1|0x2|0x80000000)

Second, shifting into the sign bit is UB, so we remove the problem by
not having a sign bit at all.

Third, this provides an out-of-line non-template overload of the
implementation for unsigned QFlags, thereby avoiding an unnecessary
instantiation of the template function qt_QMetaEnum_flagDebugOperator()
in user code.

Change-Id: I8a96935cf6c742259c9dfffd17e992caa315e1d3
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 91a27c1a516068b69ab62778a07c566ad22f3576)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-12 09:43:38 +00:00
2024-08-12 09:43:38 +00:00
2024-02-29 15:35:57 +01:00
2015-08-18 19:59:14 +00:00
2024-07-12 01:42:29 +00:00
2024-02-02 15:23:02 +00:00
2024-04-24 19:02:09 +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%