Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 11 files). Show all
Unified · Split
| @@ -27,7 +27,6 @@ · 26 unmodified lines | ||
| 27 | 27 | #include <NetworkAccessManager.h> |
| 28 | 28 | #include <NodeList.h> |
| 29 | 29 | #include <PacketHeaders.h> |
| 30 | −#include <Sound.h> | |
| 31 | 30 | #include <UUID.h> |
| 32 | 31 | #include <VoxelConstants.h> |
| 33 | 32 | #include <VoxelDetail.h> |
| @@ -47,14 +46,6 @@ · 13 unmodified lines | ||
| 47 | 46 | VoxelsScriptingInterface ScriptEngine::_voxelsScriptingInterface; |
| 48 | 47 | EntityScriptingInterface ScriptEngine::_entityScriptingInterface; |
| 49 | 48 | |
| 50 | −static QScriptValue soundConstructor(QScriptContext* context, QScriptEngine* engine) { | |
| 51 | − QUrl soundURL = QUrl(context->argument(0).toString()); | |
| 52 | − bool isStereo = context->argument(1).toBool(); | |
| 53 | − QScriptValue soundScriptValue = engine->newQObject(new Sound(soundURL, isStereo), QScriptEngine::ScriptOwnership); | |
| 54 | − | |
| 55 | − return soundScriptValue; | |
| 56 | −} | |
| 57 | − | |
| 58 | 49 | static QScriptValue debugPrint(QScriptContext* context, QScriptEngine* engine){ |
| 59 | 50 | qDebug() << "script:print()<<" << context->argument(0).toString(); |
| 60 | 51 | QString message = context->argument(0).toString() |
| @@ -263,10 +254,6 @@ void ScriptEngine::init() { · 202 unmodified lines | ||
| 263 | 254 | QScriptValue printConstructorValue = newFunction(debugPrint); |
| 264 | 255 | globalObject().setProperty("print", printConstructorValue); |
| 265 | 256 | |
| 266 | − QScriptValue soundConstructorValue = newFunction(soundConstructor); | |
| 267 | − QScriptValue soundMetaObject = newQMetaObject(&Sound::staticMetaObject, soundConstructorValue); | |
| 268 | − globalObject().setProperty("Sound", soundMetaObject); | |
| 269 | − | |
| 270 | 257 | QScriptValue localVoxelsValue = scriptValueFromQMetaObject<LocalVoxels>(); |
| 271 | 258 | globalObject().setProperty("LocalVoxels", localVoxelsValue); |
| 272 | 259 | |