Showing the changes to interface/src/scripting/AssetMappingsScriptingInterface.cpp (1 of 26 files). Show all
Unified · Split
| @@ -37,7 +37,7 @@ AssetMappingsScriptingInterface::AssetMappingsScriptingInterface() { · 36 unmodified lines | |||
| 37 | void AssetMappingsScriptingInterface::setMapping(QString path, QString hash, QJSValue callback) { | 37 | void AssetMappingsScriptingInterface::setMapping(QString path, QString hash, QJSValue callback) { |
| 38 | auto assetClient = DependencyManager::get<AssetClient>(); | 38 | auto assetClient = DependencyManager::get<AssetClient>(); |
| 39 | auto request = assetClient->createSetMappingRequest(path, hash); | 39 | auto request = assetClient->createSetMappingRequest(path, hash); |
| 40 | #ifndef ANDROID | 40 | #if !defined(Q_OS_ANDROID) |
| 41 | // TODO: just to make android compile | 41 | // TODO: just to make android compile |
| 42 | connect(request, &SetMappingRequest::finished, this, [this, callback](SetMappingRequest* request) mutable { | 42 | connect(request, &SetMappingRequest::finished, this, [this, callback](SetMappingRequest* request) mutable { |
| 43 | if (callback.isCallable()) { | 43 | if (callback.isCallable()) { |
| @@ -55,7 +55,7 @@ void AssetMappingsScriptingInterface::setMapping(QString path, QString hash, QJS · 11 unmodified lines | |||
| 55 | void AssetMappingsScriptingInterface::getMapping(QString path, QJSValue callback) { | 55 | void AssetMappingsScriptingInterface::getMapping(QString path, QJSValue callback) { |
| 56 | auto assetClient = DependencyManager::get<AssetClient>(); | 56 | auto assetClient = DependencyManager::get<AssetClient>(); |
| 57 | auto request = assetClient->createGetMappingRequest(path); | 57 | auto request = assetClient->createGetMappingRequest(path); |
| 58 | #ifndef ANDROID | 58 | #if !defined(Q_OS_ANDROID) |
| 59 | // TODO: just to make android compile | 59 | // TODO: just to make android compile |
| 60 | connect(request, &GetMappingRequest::finished, this, [this, callback](GetMappingRequest* request) mutable { | 60 | connect(request, &GetMappingRequest::finished, this, [this, callback](GetMappingRequest* request) mutable { |
| 61 | auto hash = request->getHash(); | 61 | auto hash = request->getHash(); |
| @@ -144,7 +144,7 @@ void AssetMappingsScriptingInterface::uploadFile(QString path, QString mapping, · 82 unmodified lines | |||
| 144 | void AssetMappingsScriptingInterface::deleteMappings(QStringList paths, QJSValue callback) { | 144 | void AssetMappingsScriptingInterface::deleteMappings(QStringList paths, QJSValue callback) { |
| 145 | auto assetClient = DependencyManager::get<AssetClient>(); | 145 | auto assetClient = DependencyManager::get<AssetClient>(); |
| 146 | auto request = assetClient->createDeleteMappingsRequest(paths); | 146 | auto request = assetClient->createDeleteMappingsRequest(paths); |
| 147 | #ifndef ANDROID | 147 | #if !defined(Q_OS_ANDROID) |
| 148 | // TODO: just to make android compile | 148 | // TODO: just to make android compile |
| 149 | connect(request, &DeleteMappingsRequest::finished, this, [this, callback](DeleteMappingsRequest* request) mutable { | 149 | connect(request, &DeleteMappingsRequest::finished, this, [this, callback](DeleteMappingsRequest* request) mutable { |
| 150 | if (callback.isCallable()) { | 150 | if (callback.isCallable()) { |
| @@ -162,7 +162,7 @@ void AssetMappingsScriptingInterface::deleteMappings(QStringList paths, QJSValue · 11 unmodified lines | |||
| 162 | void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) { | 162 | void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) { |
| 163 | auto assetClient = DependencyManager::get<AssetClient>(); | 163 | auto assetClient = DependencyManager::get<AssetClient>(); |
| 164 | auto request = assetClient->createGetAllMappingsRequest(); | 164 | auto request = assetClient->createGetAllMappingsRequest(); |
| 165 | #ifndef ANDROID | 165 | #if !defined(Q_OS_ANDROID) |
| 166 | // TODO: just to make android compile | 166 | // TODO: just to make android compile |
| 167 | connect(request, &GetAllMappingsRequest::finished, this, [this, callback](GetAllMappingsRequest* request) mutable { | 167 | connect(request, &GetAllMappingsRequest::finished, this, [this, callback](GetAllMappingsRequest* request) mutable { |
| 168 | auto mappings = request->getMappings(); | 168 | auto mappings = request->getMappings(); |
| @@ -187,7 +187,7 @@ void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) { · 18 unmodified lines | |||
| 187 | void AssetMappingsScriptingInterface::renameMapping(QString oldPath, QString newPath, QJSValue callback) { | 187 | void AssetMappingsScriptingInterface::renameMapping(QString oldPath, QString newPath, QJSValue callback) { |
| 188 | auto assetClient = DependencyManager::get<AssetClient>(); | 188 | auto assetClient = DependencyManager::get<AssetClient>(); |
| 189 | auto request = assetClient->createRenameMappingRequest(oldPath, newPath); | 189 | auto request = assetClient->createRenameMappingRequest(oldPath, newPath); |
| 190 | #ifndef ANDROID | 190 | #if !defined(Q_OS_ANDROID) |
| 191 | // TODO: just to make android compile | 191 | // TODO: just to make android compile |
| 192 | connect(request, &RenameMappingRequest::finished, this, [this, callback](RenameMappingRequest* request) mutable { | 192 | connect(request, &RenameMappingRequest::finished, this, [this, callback](RenameMappingRequest* request) mutable { |
| 193 | if (callback.isCallable()) { | 193 | if (callback.isCallable()) { |
| @@ -204,7 +204,7 @@ void AssetMappingsScriptingInterface::renameMapping(QString oldPath, QString new · 10 unmodified lines | |||
| 204 | void AssetMappingsScriptingInterface::setBakingEnabled(QStringList paths, bool enabled, QJSValue callback) { | 204 | void AssetMappingsScriptingInterface::setBakingEnabled(QStringList paths, bool enabled, QJSValue callback) { |
| 205 | auto assetClient = DependencyManager::get<AssetClient>(); | 205 | auto assetClient = DependencyManager::get<AssetClient>(); |
| 206 | auto request = assetClient->createSetBakingEnabledRequest(paths, enabled); | 206 | auto request = assetClient->createSetBakingEnabledRequest(paths, enabled); |
| 207 | #ifndef ANDROID | 207 | #if !defined(Q_OS_ANDROID) |
| 208 | // TODO: just to make android compile | 208 | // TODO: just to make android compile |
| 209 | connect(request, &SetBakingEnabledRequest::finished, this, [this, callback](SetBakingEnabledRequest* request) mutable { | 209 | connect(request, &SetBakingEnabledRequest::finished, this, [this, callback](SetBakingEnabledRequest* request) mutable { |
| 210 | if (callback.isCallable()) { | 210 | if (callback.isCallable()) { |