aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/parser/enumvalue.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-06-23 16:05:52 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-06-27 14:48:57 +0000
commit0c582b55984c5aa2490e807b9cf6010656fa10d5 (patch)
treee5feb6ed8581bc08168a3dc96c10a0aa35e12053 /sources/shiboken6/ApiExtractor/parser/enumvalue.cpp
parentf0109334c3087740252f55e75dd3d010d951c274 (diff)
shiboken6: Change the debug output for enums with flags to hex
Task-number: PYSIDE-1735 Task-number: PYSIDE-2088 Change-Id: I96d2cde0b4b933151e839a236e62efb1115015b8 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/parser/enumvalue.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/parser/enumvalue.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/parser/enumvalue.cpp b/sources/shiboken6/ApiExtractor/parser/enumvalue.cpp
index adc37b9c6..27e3b2e61 100644
--- a/sources/shiboken6/ApiExtractor/parser/enumvalue.cpp
+++ b/sources/shiboken6/ApiExtractor/parser/enumvalue.cpp
@@ -41,8 +41,16 @@ bool EnumValue::equals(const EnumValue &rhs) const
return m_type == Signed ? m_value == rhs.m_value : m_unsignedValue == rhs.m_unsignedValue;
}
+void EnumValue::formatDebugHex(QDebug &d) const
+{
+ d << "0x" << Qt::hex;
+ formatDebug(d);
+ d << Qt::dec;
+}
+
void EnumValue::formatDebug(QDebug &d) const
{
+
if (m_type == EnumValue::Signed)
d << m_value;
else