Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 5 files). Show all
Unified · Split
| @@ -261,20 +261,6 @@ bool ScriptEngine::setScriptContents(const QString& scriptContents, const QStrin · 260 unmodified lines | ||
| 261 | 261 | return true; |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | −void 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 | − | |
| 278 | 264 | void ScriptEngine::loadURL(const QUrl& scriptURL, bool reload) { |
| 279 | 265 | if (_isRunning) { |
| 280 | 266 | return; |