History

Revert "Make sure all entity script callbacks happen on the Entities script engine thread"

Brad Hefta-Gaub committed 11 years ago

Commit 5c6d8da1 parent 59c0cb45 files · +21 −62Browse files

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

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+0−14
@@ -261,20 +261,6 @@ bool ScriptEngine::setScriptContents(const QString& scriptContents, const QStrin · 260 unmodified lines
261 return true;261 return true;
262}262}
263 263
264void ScriptEngine::callScriptMethod(QString methodName, QScriptValue script, QScriptValueList args) {
265 if (QThread::currentThread() != thread()) {
266 QMetaObject::invokeMethod(this,
267 "callScriptMethod",
268 Q_ARG(QString, methodName),
269 Q_ARG(QScriptValue, script),
270 Q_ARG(QScriptValueList, args));
271 return;
272 }
273
274 //qDebug() << "About to call " << methodName << "() current thread : " << QThread::currentThread() << "engine thread : " << thread();
275 script.property(methodName).call(script, args);
276}
277
278void ScriptEngine::loadURL(const QUrl& scriptURL, bool reload) {264void ScriptEngine::loadURL(const QUrl& scriptURL, bool reload) {
279 if (_isRunning) {265 if (_isRunning) {
280 return;266 return;