0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-25 00:54:39 +03:00

Unexpected object destruction by script engine has been fixed

This commit is contained in:
Arin Alexander 2019-01-26 23:22:49 +03:00
parent 2500a32023
commit b3303a7ef6
2 changed files with 2 additions and 2 deletions

View File

@ -156,7 +156,7 @@ namespace Const{
template <typename T> template <typename T>
static inline QJSValue getJSValue(QJSEngine &e, T *p) static inline QJSValue getJSValue(QJSEngine &e, T *p)
{ {
QJSValue res = e.newQObject(p); QJSValue res = e.toScriptValue(p);
return res; return res;
} }
#else #else

View File

@ -156,7 +156,7 @@ namespace Const{
template <typename T> template <typename T>
static inline QJSValue getJSValue(QJSEngine &e, T *p) static inline QJSValue getJSValue(QJSEngine &e, T *p)
{ {
QJSValue res = e.newQObject(p); QJSValue res = e.toScriptValue(p);
return res; return res;
} }
#else #else