0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-11-25 00:18:06 +03:00

ReportPage item propagate to script engine has been fixed

Completer has been refactored
This commit is contained in:
Arin Alex
2018-02-15 02:21:00 +03:00
parent 04bf1dfbdb
commit d1f4a15321
8 changed files with 241 additions and 57 deletions

View File

@@ -1275,9 +1275,11 @@ void ScriptEngineContext::baseDesignIntfToScript(const QString& pageName, BaseDe
#ifdef USE_QJSENGINE
ScriptValueType sItem = getCppOwnedJSValue(*engine, item);
engine->globalObject().setProperty(pageName+"_"+item->patternName(), sItem);
QString on = item->patternName().compare(pageName) == 0 ? pageName : pageName+"_"+item->patternName();
engine->globalObject().setProperty(on, sItem);
#else
ScriptValueType sItem = engine->globalObject().property(pageName+"_"+item->patternName());
QString on = item->patternName().compare(pageName) == 0 ? pageName : pageName+"_"+item->patternName();
ScriptValueType sItem = engine->globalObject().property(on);
if (sItem.isValid()){
engine->newQObject(sItem, item);
} else {