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