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