Showing the changes to libraries/script-engine/src/ScriptAudioInjector.cpp (1 of 6 files). Show all
Unified · Split
| @@ -19,13 +19,6 @@ QScriptValue injectorToScriptValue(QScriptEngine* engine, ScriptAudioInjector* c · 18 unmodified lines | |||
| 19 | return QScriptValue(QScriptValue::NullValue); | 19 | return QScriptValue(QScriptValue::NullValue); |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | // when the script goes down we want to cleanup the injector | ||
| 23 | QObject::connect(engine, &QScriptEngine::destroyed, DependencyManager::get<AudioInjectorManager>().data(), [&] { | ||
| 24 | qCDebug(scriptengine) << "Script was shutdown, stopping an injector"; | ||
| 25 | // FIXME: this doesn't work and leaves the injectors lying around | ||
| 26 | //DependencyManager::get<AudioInjectorManager>()->stop(in->_injector); | ||
| 27 | }); | ||
| 28 | |||
| 29 | return engine->newQObject(in, QScriptEngine::ScriptOwnership); | 22 | return engine->newQObject(in, QScriptEngine::ScriptOwnership); |
| 30 | } | 23 | } |
| 31 | 24 | ||