History

Read new Sound() arg

Atlante45 committed 12 years ago

Commit f50b42f1 parent 3baa9921 file · +2 −1Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+2−1
@@ -48,7 +48,8 @@ EntityScriptingInterface ScriptEngine::_entityScriptingInterface; · 47 unmodified lines
48 48
49static QScriptValue soundConstructor(QScriptContext* context, QScriptEngine* engine) {49static QScriptValue soundConstructor(QScriptContext* context, QScriptEngine* engine) {
50 QUrl soundURL = QUrl(context->argument(0).toString());50 QUrl soundURL = QUrl(context->argument(0).toString());
51 QScriptValue soundScriptValue = engine->newQObject(new Sound(soundURL), QScriptEngine::ScriptOwnership);51 bool isStereo = context->argument(1).toBool();
52 QScriptValue soundScriptValue = engine->newQObject(new Sound(soundURL, isStereo), QScriptEngine::ScriptOwnership);
52 53
53 return soundScriptValue;54 return soundScriptValue;
54}55}