diff options
| author | Fabian Kosmale <fabian.kosmale@qt.io> | 2023-03-17 15:54:25 +0100 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-04-12 03:36:21 +0200 |
| commit | 69db2dbc4a799455884e94f69446152720e36de8 (patch) | |
| tree | 73d7f258299c5e08e5a659db0518bd2615790674 /src/qml/jsruntime/qv4qobjectwrapper.cpp | |
| parent | 951ab9f3c06311458bc7d44c127e034af3e4cff5 (diff) | |
QML: Allow some more backing types for enums
Task-number: QTBUG-112180
Done-with: Fabian Kosmale <fabian.kosmale@qt.io>
Change-Id: I48a2a696d3424ab1d8b9e693a92361a978ad70e9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index e2ebda7d0e..865f2af699 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -131,7 +131,7 @@ static ReturnedValue loadProperty( return QmlListWrapper::create(v4, object, property.coreIndex(), propMetaType); // TODO: Check all the builtin types here. See getGadgetProperty() in qqmlvaluetypewrapper.cpp - switch (property.isEnum() ? QMetaType::Int : propMetaType.id()) { + switch (property.isEnum() ? propMetaType.underlyingType().id() : propMetaType.id()) { case QMetaType::Int: { int v = 0; property.readProperty(object, &v); |
