aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/parser/codemodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/ApiExtractor/parser/codemodel.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/parser/codemodel.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/sources/shiboken2/ApiExtractor/parser/codemodel.cpp b/sources/shiboken2/ApiExtractor/parser/codemodel.cpp
index fbfeaadf7..1262f5901 100644
--- a/sources/shiboken2/ApiExtractor/parser/codemodel.cpp
+++ b/sources/shiboken2/ApiExtractor/parser/codemodel.cpp
@@ -1014,6 +1014,16 @@ void _EnumModelItem::addEnumerator(EnumeratorModelItem item)
m_enumerators.append(item);
}
+bool _EnumModelItem::isSigned() const
+{
+ return m_signed;
+}
+
+void _EnumModelItem::setSigned(bool s)
+{
+ m_signed = s;
+}
+
#ifndef QT_NO_DEBUG_STREAM
void _EnumModelItem::formatDebug(QDebug &d) const
{
@@ -1028,6 +1038,8 @@ void _EnumModelItem::formatDebug(QDebug &d) const
d << " (class)";
break;
}
+ if (!m_signed)
+ d << " (unsigned)";
formatModelItemList(d, ", enumerators=", m_enumerators);
}
#endif // !QT_NO_DEBUG_STREAM
@@ -1037,22 +1049,21 @@ _EnumeratorModelItem::~_EnumeratorModelItem()
{
}
-QString _EnumeratorModelItem::value() const
+QString _EnumeratorModelItem::stringValue() const
{
- return m_value;
+ return m_stringValue;
}
-void _EnumeratorModelItem::setValue(const QString &value)
+void _EnumeratorModelItem::setStringValue(const QString &value)
{
- m_value = value;
+ m_stringValue = value;
}
#ifndef QT_NO_DEBUG_STREAM
void _EnumeratorModelItem::formatDebug(QDebug &d) const
{
_CodeModelItem::formatDebug(d);
- if (!m_value.isEmpty())
- d << ", value=\"" << m_value << '"';
+ d << ", value=" << m_value << ", stringValue=\"" << m_stringValue << '"';
}
#endif // !QT_NO_DEBUG_STREAM