From 2cb39f1f906f23244f9ed26df3450c4878ed134b Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Wed, 5 Feb 2020 09:08:54 +0300 Subject: [PATCH] Building with qtscriptengine has been fixed --- common.pri | 2 +- limereport/lrscriptenginemanager.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common.pri b/common.pri index 609d3fa..1ab4c24 100644 --- a/common.pri +++ b/common.pri @@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 33 +LIMEREPORT_VERSION_RELEASE = 35 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/lrscriptenginemanager.cpp b/limereport/lrscriptenginemanager.cpp index 19d6a83..f974c51 100644 --- a/limereport/lrscriptenginemanager.cpp +++ b/limereport/lrscriptenginemanager.cpp @@ -279,19 +279,19 @@ bool ScriptEngineManager::addFunction(const QString& name, const QString& category, const QString& description) { - if (!containsFunction(name)){ + if (!isFunctionExists(name)){ ScriptFunctionDesc funct; funct.name = name; funct.description = description; funct.category = category; funct.scriptValue = scriptEngine()->newFunction(function); - funct.scriptValue.setProperty("functionName",name); + funct.scriptValue.setProperty("functionName", name); funct.scriptValue.setData(m_scriptEngine->toScriptValue(this)); funct.type = ScriptFunctionDesc::Native; - m_functions.append(funct); + m_functions.insert(name, funct); if (m_model) m_model->updateModel(); - m_scriptEngine->globalObject().setProperty(funct.name,funct.scriptValue); + m_scriptEngine->globalObject().setProperty(funct.name, funct.scriptValue); return true; } else { return false;