History

make Assets.getMapping(path) actually return the mapping

humbletim committed 10 years ago

Commit 3e0ef7d1 parent 17a5fa01 file · +3 −1Browse files

Showing the changes to interface/src/scripting/AssetMappingsScriptingInterface.cpp (1 of 1 file). Show all

Unified · Split

interface/src/scripting/AssetMappingsScriptingInterface.cpp+3−1
@@ -62,8 +62,10 @@ void AssetMappingsScriptingInterface::getMapping(QString path, QJSValue callback · 61 unmodified lines
62 auto request = assetClient->createGetMappingRequest(path);62 auto request = assetClient->createGetMappingRequest(path);
63 63
64 connect(request, &GetMappingRequest::finished, this, [this, callback](GetMappingRequest* request) mutable {64 connect(request, &GetMappingRequest::finished, this, [this, callback](GetMappingRequest* request) mutable {
65 auto hash = request->getHash();
66
65 if (callback.isCallable()) {67 if (callback.isCallable()) {
66 QJSValueList args { request->getErrorString() };68 QJSValueList args { request->getErrorString(), hash };
67 callback.call(args);69 callback.call(args);
68 }70 }
69 71