Showing the changes to interface/src/scripting/AssetMappingsScriptingInterface.cpp (1 of 34 files). Show all
Unified · Split
| @@ -139,8 +139,7 @@ void AssetMappingsScriptingInterface::uploadFile(QString path, QString mapping, · 138 unmodified lines | |||
| 139 | void AssetMappingsScriptingInterface::deleteMappings(QStringList paths, QJSValue callback) { | 139 | void AssetMappingsScriptingInterface::deleteMappings(QStringList paths, QJSValue callback) { |
| 140 | auto assetClient = DependencyManager::get<AssetClient>(); | 140 | auto assetClient = DependencyManager::get<AssetClient>(); |
| 141 | auto request = assetClient->createDeleteMappingsRequest(paths); | 141 | auto request = assetClient->createDeleteMappingsRequest(paths); |
| 142 | #if !defined(Q_OS_ANDROID) | 142 | |
| 143 | // TODO: just to make android compile | ||
| 144 | connect(request, &DeleteMappingsRequest::finished, this, [this, callback](DeleteMappingsRequest* request) mutable { | 143 | connect(request, &DeleteMappingsRequest::finished, this, [this, callback](DeleteMappingsRequest* request) mutable { |
| 145 | if (callback.isCallable()) { | 144 | if (callback.isCallable()) { |
| 146 | QJSValueList args { request->getErrorString() }; | 145 | QJSValueList args { request->getErrorString() }; |
| @@ -149,7 +148,6 @@ void AssetMappingsScriptingInterface::deleteMappings(QStringList paths, QJSValue · 2 unmodified lines | |||
| 149 | 148 | ||
| 150 | request->deleteLater(); | 149 | request->deleteLater(); |
| 151 | }); | 150 | }); |
| 152 | #endif | ||
| 153 | 151 | ||
| 154 | request->start(); | 152 | request->start(); |
| 155 | } | 153 | } |
| @@ -157,8 +155,7 @@ void AssetMappingsScriptingInterface::deleteMappings(QStringList paths, QJSValue · 1 unmodified line | |||
| 157 | void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) { | 155 | void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) { |
| 158 | auto assetClient = DependencyManager::get<AssetClient>(); | 156 | auto assetClient = DependencyManager::get<AssetClient>(); |
| 159 | auto request = assetClient->createGetAllMappingsRequest(); | 157 | auto request = assetClient->createGetAllMappingsRequest(); |
| 160 | #if !defined(Q_OS_ANDROID) | 158 | |
| 161 | // TODO: just to make android compile | ||
| 162 | connect(request, &GetAllMappingsRequest::finished, this, [this, callback](GetAllMappingsRequest* request) mutable { | 159 | connect(request, &GetAllMappingsRequest::finished, this, [this, callback](GetAllMappingsRequest* request) mutable { |
| 163 | auto mappings = request->getMappings(); | 160 | auto mappings = request->getMappings(); |
| 164 | auto map = callback.engine()->newObject(); | 161 | auto map = callback.engine()->newObject(); |
| @@ -174,7 +171,6 @@ void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) { · 9 unmodified lines | |||
| 174 | 171 | ||
| 175 | request->deleteLater(); | 172 | request->deleteLater(); |
| 176 | }); | 173 | }); |
| 177 | #endif | ||
| 178 | 174 | ||
| 179 | request->start(); | 175 | request->start(); |
| 180 | } | 176 | } |
| @@ -182,8 +178,7 @@ void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) { · 1 unmodified line | |||
| 182 | void AssetMappingsScriptingInterface::renameMapping(QString oldPath, QString newPath, QJSValue callback) { | 178 | void AssetMappingsScriptingInterface::renameMapping(QString oldPath, QString newPath, QJSValue callback) { |
| 183 | auto assetClient = DependencyManager::get<AssetClient>(); | 179 | auto assetClient = DependencyManager::get<AssetClient>(); |
| 184 | auto request = assetClient->createRenameMappingRequest(oldPath, newPath); | 180 | auto request = assetClient->createRenameMappingRequest(oldPath, newPath); |
| 185 | #if !defined(Q_OS_ANDROID) | 181 | |
| 186 | // TODO: just to make android compile | ||
| 187 | connect(request, &RenameMappingRequest::finished, this, [this, callback](RenameMappingRequest* request) mutable { | 182 | connect(request, &RenameMappingRequest::finished, this, [this, callback](RenameMappingRequest* request) mutable { |
| 188 | if (callback.isCallable()) { | 183 | if (callback.isCallable()) { |
| 189 | QJSValueList args{ request->getErrorString() }; | 184 | QJSValueList args{ request->getErrorString() }; |
| @@ -192,15 +187,14 @@ void AssetMappingsScriptingInterface::renameMapping(QString oldPath, QString new · 2 unmodified lines | |||
| 192 | 187 | ||
| 193 | request->deleteLater(); | 188 | request->deleteLater(); |
| 194 | }); | 189 | }); |
| 195 | #endif | 190 | |
| 196 | request->start(); | 191 | request->start(); |
| 197 | } | 192 | } |
| 198 | 193 | ||
| 199 | void AssetMappingsScriptingInterface::setBakingEnabled(QStringList paths, bool enabled, QJSValue callback) { | 194 | void AssetMappingsScriptingInterface::setBakingEnabled(QStringList paths, bool enabled, QJSValue callback) { |
| 200 | auto assetClient = DependencyManager::get<AssetClient>(); | 195 | auto assetClient = DependencyManager::get<AssetClient>(); |
| 201 | auto request = assetClient->createSetBakingEnabledRequest(paths, enabled); | 196 | auto request = assetClient->createSetBakingEnabledRequest(paths, enabled); |
| 202 | #if !defined(Q_OS_ANDROID) | 197 | |
| 203 | // TODO: just to make android compile | ||
| 204 | connect(request, &SetBakingEnabledRequest::finished, this, [this, callback](SetBakingEnabledRequest* request) mutable { | 198 | connect(request, &SetBakingEnabledRequest::finished, this, [this, callback](SetBakingEnabledRequest* request) mutable { |
| 205 | if (callback.isCallable()) { | 199 | if (callback.isCallable()) { |
| 206 | QJSValueList args{ request->getErrorString() }; | 200 | QJSValueList args{ request->getErrorString() }; |
| @@ -209,7 +203,7 @@ void AssetMappingsScriptingInterface::setBakingEnabled(QStringList paths, bool e · 2 unmodified lines | |||
| 209 | 203 | ||
| 210 | request->deleteLater(); | 204 | request->deleteLater(); |
| 211 | }); | 205 | }); |
| 212 | #endif | 206 | |
| 213 | request->start(); | 207 | request->start(); |
| 214 | } | 208 | } |
| 215 | 209 | ||