Showing the changes to libraries/script-engine/src/AssetScriptingInterface.cpp (1 of 2 files). Show all
Unified · Split
| @@ -61,13 +61,15 @@ void AssetScriptingInterface::getMapping(QString path, QScriptValue callback) { · 60 unmodified lines | |||
| 61 | auto result = request->getError(); | 61 | auto result = request->getError(); |
| 62 | if (callback.isFunction()) { | 62 | if (callback.isFunction()) { |
| 63 | if (result == GetMappingRequest::NotFound) { | 63 | if (result == GetMappingRequest::NotFound) { |
| 64 | QScriptValueList args { "" }; | 64 | QScriptValueList args { "", true }; |
| 65 | callback.call(_engine->currentContext()->thisObject(), args); | 65 | callback.call(_engine->currentContext()->thisObject(), args); |
| 66 | } else if (result == GetMappingRequest::NoError) { | 66 | } else if (result == GetMappingRequest::NoError) { |
| 67 | QScriptValueList args { request->getHash() }; | 67 | QScriptValueList args { request->getHash(), true }; |
| 68 | callback.call(_engine->currentContext()->thisObject(), args); | 68 | callback.call(_engine->currentContext()->thisObject(), args); |
| 69 | } else { | 69 | } else { |
| 70 | qCDebug(scriptengine) << "error -- " << request->getError() << " -- " << request->getErrorString(); | 70 | qCDebug(scriptengine) << "error -- " << request->getError() << " -- " << request->getErrorString(); |
| 71 | QScriptValueList args { "", false }; | ||
| 72 | callback.call(_engine->currentContext()->thisObject(), args); | ||
| 71 | } | 73 | } |
| 72 | request->deleteLater(); | 74 | request->deleteLater(); |
| 73 | } | 75 | } |