mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 17:53:32 +02:00
make Assets.getMapping(path) actually return the mapping
This commit is contained in:
parent
17a5fa040d
commit
3e0ef7d43a
1 changed files with 3 additions and 1 deletions
|
@ -62,8 +62,10 @@ void AssetMappingsScriptingInterface::getMapping(QString path, QJSValue callback
|
|||
auto request = assetClient->createGetMappingRequest(path);
|
||||
|
||||
connect(request, &GetMappingRequest::finished, this, [this, callback](GetMappingRequest* request) mutable {
|
||||
auto hash = request->getHash();
|
||||
|
||||
if (callback.isCallable()) {
|
||||
QJSValueList args { request->getErrorString() };
|
||||
QJSValueList args { request->getErrorString(), hash };
|
||||
callback.call(args);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue