Showing the changes to interface/src/scripting/AssetMappingsScriptingInterface.cpp (1 of 19 files). Show all
Unified · Split
| @@ -39,9 +39,7 @@ AssetMappingsScriptingInterface::AssetMappingsScriptingInterface() { · 38 unmodified lines | ||
| 39 | 39 | void AssetMappingsScriptingInterface::setMapping(QString path, QString hash, QJSValue callback) { |
| 40 | 40 | auto assetClient = DependencyManager::get<AssetClient>(); |
| 41 | 41 | auto request = assetClient->createSetMappingRequest(path, hash); |
| 42 | −#if !defined(Q_OS_ANDROID) | |
| 43 | −// TODO: just to make android compile | |
| 44 | − connect(request, &SetMappingRequest::finished, this, [this, callback](SetMappingRequest* request) mutable { | |
| 42 | + connect(request, &SetMappingRequest::finished, this, [callback](SetMappingRequest* request) mutable { | |
| 45 | 43 | if (callback.isCallable()) { |
| 46 | 44 | QJSValueList args { request->getErrorString(), request->getPath() }; |
| 47 | 45 | callback.call(args); |
| @@ -49,17 +47,13 @@ void AssetMappingsScriptingInterface::setMapping(QString path, QString hash, QJS · 1 unmodified line | ||
| 49 | 47 | |
| 50 | 48 | request->deleteLater(); |
| 51 | 49 | }); |
| 52 | −#endif | |
| 53 | − | |
| 54 | 50 | request->start(); |
| 55 | 51 | } |
| 56 | 52 | |
| 57 | 53 | void AssetMappingsScriptingInterface::getMapping(QString path, QJSValue callback) { |
| 58 | 54 | auto assetClient = DependencyManager::get<AssetClient>(); |
| 59 | 55 | auto request = assetClient->createGetMappingRequest(path); |
| 60 | −#if !defined(Q_OS_ANDROID) | |
| 61 | −// TODO: just to make android compile | |
| 62 | − connect(request, &GetMappingRequest::finished, this, [this, callback](GetMappingRequest* request) mutable { | |
| 56 | + connect(request, &GetMappingRequest::finished, this, [callback](GetMappingRequest* request) mutable { | |
| 63 | 57 | auto hash = request->getHash(); |
| 64 | 58 | |
| 65 | 59 | if (callback.isCallable()) { |
| @@ -69,7 +63,6 @@ void AssetMappingsScriptingInterface::getMapping(QString path, QJSValue callback · 3 unmodified lines | ||
| 69 | 63 | |
| 70 | 64 | request->deleteLater(); |
| 71 | 65 | }); |
| 72 | −#endif | |
| 73 | 66 | |
| 74 | 67 | request->start(); |
| 75 | 68 | } |