aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4lookup_p.h
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2021-02-09 14:29:24 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-22 14:20:19 +0000
commit0c029b420ea9b7631cf87d427c0821320064c01b (patch)
tree2f4a5fec2d7d135caa64df3cdb1619668288ecc2 /src/qml/jsruntime/qv4lookup_p.h
parent911191793f10b6c160b282b98e7cf585103ca47c (diff)
Fix QJSValue singletons only supporting object types
Now primitives such as integers and strings should also work. Fixes: QTBUG-85615 Change-Id: I201d1844b7272ca50e32f1e33e9ac357b5e68dfe Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 64102ae231317eb6f637304918e55153dadef72d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/qml/jsruntime/qv4lookup_p.h')
-rw-r--r--src/qml/jsruntime/qv4lookup_p.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4lookup_p.h b/src/qml/jsruntime/qv4lookup_p.h
index 6232d78a57..950e5da768 100644
--- a/src/qml/jsruntime/qv4lookup_p.h
+++ b/src/qml/jsruntime/qv4lookup_p.h
@@ -138,8 +138,9 @@ struct Q_QML_PRIVATE_EXPORT Lookup {
int scriptIndex;
} qmlContextScriptLookup;
struct {
- Heap::Object *singleton;
- quintptr unused;
+ Heap::Base *singletonObject;
+ quintptr unused2;
+ QV4::ReturnedValue singletonValue;
} qmlContextSingletonLookup;
struct {
quintptr unused1;