CppSharp
CppSharp copied to clipboard
Null ref at Enumeration.Item.IsHexadecimal with qmetatype.h
The problem is that most enum members of QMetaType::Type are defined using a macro, that is:
enum Type {
// these are merged with QVariant
QT_FOR_EACH_STATIC_TYPE(QT_DEFINE_METATYPE_ID)
FirstCoreType = Bool,
LastCoreType = QJsonDocument,
FirstGuiType = QFont,
LastGuiType = QPolygonF,
FirstWidgetsType = QSizePolicy,
LastWidgetsType = QSizePolicy,
HighestInternalId = LastWidgetsType,
QReal = sizeof(qreal) == sizeof(double) ? Double : Float,
UnknownType = 0,
User = 1024
};
I'd think the macro would have to be expanded before working with the items of the enum.
Still a problem?
Not to me, it's worked around. But the Expression property of such enum members is still null. The work around is that such members are assumed to be non-hexadecimal. While this concerns only the pretty print and not the API or behaviour, it's still a hack.
Issues go stale after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
/lifecycle stale