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
6868 DependencyManager::set<AudioInjectorManager>();
6969
7070 DependencyManager::set<ScriptCache>();
71− DependencyManager::set<ScriptEngines>(ScriptEngine::ENTITY_SERVER_SCRIPT);
72−
73− DependencyManager::set<EntityScriptServerServices>();
7471
7572
7673 // 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
253250
254251
255252 void EntityScriptServer::run() {
253+ DependencyManager::set<ScriptEngines>(ScriptEngine::ENTITY_SERVER_SCRIPT);
254+ DependencyManager::set<EntityScriptServerServices>();
255+
256256 // make sure we request our script once the agent connects to the domain
257257 auto nodeList = DependencyManager::get<NodeList>();
258258