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
6262 auto request = assetClient->createGetMappingRequest(path);
6363
6464 connect(request, &GetMappingRequest::finished, this, [this, callback](GetMappingRequest* request) mutable {
65+ auto hash = request->getHash();
66+
6567 if (callback.isCallable()) {
66− QJSValueList args { request->getErrorString() };
68+ QJSValueList args { request->getErrorString(), hash };
6769 callback.call(args);
6870 }
6971