From b3303a7ef6330fcf6be3a6f4d5872e05d7ff8380 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Sat, 26 Jan 2019 23:22:49 +0300 Subject: [PATCH] Unexpected object destruction by script engine has been fixed --- include/lrglobal.h | 2 +- limereport/lrglobal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/lrglobal.h b/include/lrglobal.h index d1cb8b9..80568c5 100644 --- a/include/lrglobal.h +++ b/include/lrglobal.h @@ -156,7 +156,7 @@ namespace Const{ template static inline QJSValue getJSValue(QJSEngine &e, T *p) { - QJSValue res = e.newQObject(p); + QJSValue res = e.toScriptValue(p); return res; } #else diff --git a/limereport/lrglobal.h b/limereport/lrglobal.h index d1cb8b9..80568c5 100644 --- a/limereport/lrglobal.h +++ b/limereport/lrglobal.h @@ -156,7 +156,7 @@ namespace Const{ template static inline QJSValue getJSValue(QJSEngine &e, T *p) { - QJSValue res = e.newQObject(p); + QJSValue res = e.toScriptValue(p); return res; } #else