From dd5c1f6ca05cb61d3c643888a21961d75951ab9b Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Sun, 27 Jan 2019 00:09:43 +0300 Subject: [PATCH] getJSValue() has been fixed --- include/lrglobal.h | 3 ++- limereport/lrglobal.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/lrglobal.h b/include/lrglobal.h index 80568c5..103edfc 100644 --- a/include/lrglobal.h +++ b/include/lrglobal.h @@ -156,7 +156,8 @@ namespace Const{ template static inline QJSValue getJSValue(QJSEngine &e, T *p) { - QJSValue res = e.toScriptValue(p); + QJSValue res = e.newQObject(p); + QQmlEngine::setObjectOwnership(p, QQmlEngine::CppOwnership); return res; } #else diff --git a/limereport/lrglobal.h b/limereport/lrglobal.h index 80568c5..103edfc 100644 --- a/limereport/lrglobal.h +++ b/limereport/lrglobal.h @@ -156,7 +156,8 @@ namespace Const{ template static inline QJSValue getJSValue(QJSEngine &e, T *p) { - QJSValue res = e.toScriptValue(p); + QJSValue res = e.newQObject(p); + QQmlEngine::setObjectOwnership(p, QQmlEngine::CppOwnership); return res; } #else