Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 3 files). Show all
Unified · Split
| @@ -119,6 +119,8 @@ void ScriptEngine::init() { · 118 unmodified lines | |||
| 119 | 119 | ||
| 120 | QScriptValue audioScriptingInterfaceValue = _engine.newQObject(&_audioScriptingInterface); | 120 | QScriptValue audioScriptingInterfaceValue = _engine.newQObject(&_audioScriptingInterface); |
| 121 | _engine.globalObject().setProperty("Audio", audioScriptingInterfaceValue); | 121 | _engine.globalObject().setProperty("Audio", audioScriptingInterfaceValue); |
| 122 | |||
| 123 | registerGlobalObject("Data", &_dataServerScriptingInterface); | ||
| 122 | 124 | ||
| 123 | if (_controllerScriptingInterface) { | 125 | if (_controllerScriptingInterface) { |
| 124 | QScriptValue controllerScripterValue = _engine.newQObject(_controllerScriptingInterface); | 126 | QScriptValue controllerScripterValue = _engine.newQObject(_controllerScriptingInterface); |
| @@ -140,6 +142,10 @@ void ScriptEngine::registerGlobalObject(const QString& name, QObject* object) { · 15 unmodified lines | |||
| 140 | _engine.globalObject().setProperty(name, value); | 142 | _engine.globalObject().setProperty(name, value); |
| 141 | } | 143 | } |
| 142 | 144 | ||
| 145 | void ScriptEngine::preEvaluateReset() { | ||
| 146 | _dataServerScriptingInterface.refreshUUID(); | ||
| 147 | } | ||
| 148 | |||
| 143 | void ScriptEngine::evaluate() { | 149 | void ScriptEngine::evaluate() { |
| 144 | if (!_isInitialized) { | 150 | if (!_isInitialized) { |
| 145 | init(); | 151 | init(); |