History

CR feedback and code cleanup

humbletim committed 8 years ago

Commit 3a735c11 parent 395cc6614 files · +652 −365Browse files

Showing the changes to libraries/shared/src/BaseScriptEngine.cpp (1 of 14 files). Show all

Unified · Split

libraries/shared/src/BaseScriptEngine.cpp+6−0
@@ -325,6 +325,12 @@ QScriptValue makeScopedHandlerObject(QScriptValue scopeOrCallback, QScriptValue · 324 unmodified lines
325 } else if (methodOrName.isFunction()) {325 } else if (methodOrName.isFunction()) {
326 scope = scopeOrCallback;326 scope = scopeOrCallback;
327 callback = methodOrName;327 callback = methodOrName;
328 } else if (!methodOrName.isValid()) {
329 // instantiate from an existing scoped handler object
330 if (scopeOrCallback.property("callback").isFunction()) {
331 scope = scopeOrCallback.property("scope");
332 callback = scopeOrCallback.property("callback");
333 }
328 }334 }
329 }335 }
330 auto handler = engine->newObject();336 auto handler = engine->newObject();