diff options
| author | Fabian Kosmale <fabian.kosmale@qt.io> | 2023-03-14 14:59:20 +0100 |
|---|---|---|
| committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2023-03-28 10:59:53 +0200 |
| commit | e7cb3cb041dc11001cccf4307d1f9e46a2926821 (patch) | |
| tree | 6399d0871e240bb43ae4f14776219689729890b1 /examples/widgets/doc/src | |
| parent | 454b1de22c77b7c4917dfa9d6182b4ea80b49dc5 (diff) | |
QMetaType: Provide underlyingType for enums
Currently, Qt assumes that enums always have int as their underlying
type (both in QMetaEnum::keyToValue and in the QML engine). This change
makes it possible to to retrieve the underlying type from an enum's
metaype - or rather, a metatype of an integral type with the same size
and signedness. The use cases aobve don't really rely on the exact same
type. In most cases, we wouldn't even need the signedness, however that
is already available anyway, and it will come in handy once QML supports
bigint, and we need to decide whether we should return
While it would be possible for individual users of this function to
manually query the size and signedness, having a function returning a
metatype offers additional convenience - especially in QML, where the
conversion APIs generally operate on metatypes.
Task-number: QTBUG-27451
Task-number: QTBUG-84055
Task-number: QTBUG-112180
Change-Id: Icf733b42df0ea64017d69f4d94cb7c855d9e3201
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'examples/widgets/doc/src')
0 files changed, 0 insertions, 0 deletions
