History

Create and destroy ScriptModel on its owning thread

QFileSystemWatcher, a component, must be destroyed on the thread that created it.

Simon Walton committed 8 years ago

Commit 7270ab91 parent b7069ff1 file · +3 −3Browse files

Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 1 file). Show all

Unified · Split

assignment-client/src/scripts/EntityScriptServer.cpp+3−3
@@ -68,9 +68,6 @@ EntityScriptServer::EntityScriptServer(ReceivedMessage& message) : ThreadedAssig · 67 unmodified lines
68 DependencyManager::set<AudioInjectorManager>();68 DependencyManager::set<AudioInjectorManager>();
69 69
70 DependencyManager::set<ScriptCache>();70 DependencyManager::set<ScriptCache>();
71 DependencyManager::set<ScriptEngines>(ScriptEngine::ENTITY_SERVER_SCRIPT);
72
73 DependencyManager::set<EntityScriptServerServices>();
74 71
75 72
76 // Needed to ensure the creation of the DebugDraw instance on the main thread73 // Needed to ensure the creation of the DebugDraw instance on the main thread
@@ -253,6 +250,9 @@ void EntityScriptServer::handleEntityScriptCallMethodPacket(QSharedPointer<Recei · 176 unmodified lines
253 250
254 251
255void EntityScriptServer::run() {252void EntityScriptServer::run() {
253 DependencyManager::set<ScriptEngines>(ScriptEngine::ENTITY_SERVER_SCRIPT);
254 DependencyManager::set<EntityScriptServerServices>();
255
256 // make sure we request our script once the agent connects to the domain256 // make sure we request our script once the agent connects to the domain
257 auto nodeList = DependencyManager::get<NodeList>();257 auto nodeList = DependencyManager::get<NodeList>();
258 258