mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 01:43:27 +02:00
Add XMLHttpRequest constructor to ScriptEngine
This commit is contained in:
parent
7d7e012965
commit
2dda87fe7f
1 changed files with 4 additions and 0 deletions
|
@ -34,6 +34,7 @@
|
|||
#include "MenuItemProperties.h"
|
||||
#include "LocalVoxels.h"
|
||||
#include "ScriptEngine.h"
|
||||
#include "XMLHttpRequestClass.h"
|
||||
|
||||
VoxelsScriptingInterface ScriptEngine::_voxelsScriptingInterface;
|
||||
ParticlesScriptingInterface ScriptEngine::_particlesScriptingInterface;
|
||||
|
@ -214,6 +215,9 @@ void ScriptEngine::init() {
|
|||
qScriptRegisterSequenceMetaType<QVector<glm::quat> >(&_engine);
|
||||
qScriptRegisterSequenceMetaType<QVector<QString> >(&_engine);
|
||||
|
||||
QScriptValue xmlHttpRequestConstructorValue = _engine.newFunction(XMLHttpRequestClass::constructor);
|
||||
_engine.globalObject().setProperty("XMLHttpRequest", xmlHttpRequestConstructorValue);
|
||||
|
||||
QScriptValue printConstructorValue = _engine.newFunction(debugPrint);
|
||||
_engine.globalObject().setProperty("print", printConstructorValue);
|
||||
|
||||
|
|
Loading…
Reference in a new issue