aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsapi
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-01-06 13:38:08 +0100
committerUlf Hermann <ulf.hermann@qt.io>2023-01-16 23:03:57 +0000
commite070b5aa391bb706cad93b69aa575a0f2e0d23ad (patch)
tree4781c62e79eeec06826262064b896382ac944507 /src/qml/jsapi
parent4b7566ade282694c1903a10867a1612cb04630dd (diff)
Allow extraction of V4 values from QJSPrimitiveValue
Since we can produce QJSPrimitiveValue in metaTypeFromJS, we should also handle the other direction. Fixes: QTBUG-109867 Pick-to: 6.5 Change-Id: I2c7598d19eba3e78d071ca3eceb32deda4d0ead8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsapi')
-rw-r--r--src/qml/jsapi/qjsprimitivevalue.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/jsapi/qjsprimitivevalue.h b/src/qml/jsapi/qjsprimitivevalue.h
index 93a3d0ff00..6070b07ede 100644
--- a/src/qml/jsapi/qjsprimitivevalue.h
+++ b/src/qml/jsapi/qjsprimitivevalue.h
@@ -16,6 +16,8 @@
QT_BEGIN_NAMESPACE
+namespace QV4 { struct ExecutionEngine; }
+
struct QJSPrimitiveUndefined {};
struct QJSPrimitiveNull {};
@@ -522,6 +524,7 @@ public:
private:
friend class QJSManagedValue;
friend class QJSValue;
+ friend struct QV4::ExecutionEngine;
constexpr bool asBoolean() const { return d.getBool(); }
constexpr int asInteger() const { return d.getInt(); }