From 5e6704c69795ce9b8afc3a6fe0fcb3a1d5f042f3 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Tue, 8 May 2018 10:53:27 +0300 Subject: [PATCH] QQmlEngine -> QJSEngine --- common.pri | 11 ++++++----- include/lrglobal.h | 5 ++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common.pri b/common.pri index b4a4dce..cef5fe8 100644 --- a/common.pri +++ b/common.pri @@ -18,12 +18,13 @@ contains(CONFIG, easy_profiler){ !contains(CONFIG, qtscriptengine){ greaterThan(QT_MAJOR_VERSION, 4){ -greaterThan(QT_MINOR_VERSION, 5){ CONFIG *= qjsengine -} -lessThan(QT_MINOR_VERSION, 6){ - CONFIG *= qtscriptengine -} +#greaterThan(QT_MINOR_VERSION, 5){ +# CONFIG *= qjsengine +#} +#lessThan(QT_MINOR_VERSION, 6){ +# CONFIG *= qtscriptengine +#} } lessThan(QT_MAJOR_VERSION, 5){ CONFIG *= qtscriptengine diff --git a/include/lrglobal.h b/include/lrglobal.h index fdc35d4..b32d263 100644 --- a/include/lrglobal.h +++ b/include/lrglobal.h @@ -138,13 +138,12 @@ namespace Const{ #endif #ifdef USE_QJSENGINE - typedef QQmlEngine ScriptEngineType; + typedef QJSEngine ScriptEngineType; typedef QJSValue ScriptValueType; template - static inline QJSValue getCppOwnedJSValue(QJSEngine &e, T *p) + static inline QJSValue getJSValue(QJSEngine &e, T *p) { QJSValue res = e.newQObject(p); - QQmlEngine::setObjectOwnership(p, QQmlEngine::CppOwnership); return res; } #else