mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-24 20:44:39 +03:00
getJSValue() has been fixed
This commit is contained in:
parent
0d0ba64bac
commit
dd5c1f6ca0
@ -156,7 +156,8 @@ 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.toScriptValue(p);
|
QJSValue res = e.newQObject(p);
|
||||||
|
QQmlEngine::setObjectOwnership(p, QQmlEngine::CppOwnership);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -156,7 +156,8 @@ 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.toScriptValue(p);
|
QJSValue res = e.newQObject(p);
|
||||||
|
QQmlEngine::setObjectOwnership(p, QQmlEngine::CppOwnership);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user