Showing the changes to interface/src/Application_Assets.cpp (1 of 42 files). Show all
Unified · Split
| @@ -200,7 +200,7 @@ void Application::addAssetToWorldUnzipFailure(QString filePath) { · 199 unmodified lines | |||
| 200 | void Application::addAssetToWorldWithNewMapping(QString filePath, QString mapping, int copy, bool isZip) { | 200 | void Application::addAssetToWorldWithNewMapping(QString filePath, QString mapping, int copy, bool isZip) { |
| 201 | auto request = DependencyManager::get<AssetClient>()->createGetMappingRequest(mapping); | 201 | auto request = DependencyManager::get<AssetClient>()->createGetMappingRequest(mapping); |
| 202 | 202 | ||
| 203 | QObject::connect(request, &GetMappingRequest::finished, this, [=](GetMappingRequest* request) mutable { | 203 | QObject::connect(request, &GetMappingRequest::finished, this, [=, this](GetMappingRequest* request) mutable { |
| 204 | const int MAX_COPY_COUNT = 100; // Limit number of duplicate assets; recursion guard. | 204 | const int MAX_COPY_COUNT = 100; // Limit number of duplicate assets; recursion guard. |
| 205 | auto result = request->getError(); | 205 | auto result = request->getError(); |
| 206 | if (result == GetMappingRequest::NotFound) { | 206 | if (result == GetMappingRequest::NotFound) { |
| @@ -232,7 +232,7 @@ void Application::addAssetToWorldWithNewMapping(QString filePath, QString mappin · 25 unmodified lines | |||
| 232 | void Application::addAssetToWorldUpload(QString filePath, QString mapping, bool isZip) { | 232 | void Application::addAssetToWorldUpload(QString filePath, QString mapping, bool isZip) { |
| 233 | qInfo(interfaceapp) << "Uploading" << filePath << "to Asset Server as" << mapping; | 233 | qInfo(interfaceapp) << "Uploading" << filePath << "to Asset Server as" << mapping; |
| 234 | auto upload = DependencyManager::get<AssetClient>()->createUpload(filePath); | 234 | auto upload = DependencyManager::get<AssetClient>()->createUpload(filePath); |
| 235 | QObject::connect(upload, &AssetUpload::finished, this, [=](AssetUpload* upload, const QString& hash) mutable { | 235 | QObject::connect(upload, &AssetUpload::finished, this, [=, this](AssetUpload* upload, const QString& hash) mutable { |
| 236 | if (upload->getError() != AssetUpload::NoError) { | 236 | if (upload->getError() != AssetUpload::NoError) { |
| 237 | QString errorInfo = "Could not upload model to the Asset Server."; | 237 | QString errorInfo = "Could not upload model to the Asset Server."; |
| 238 | qWarning(interfaceapp) << "Error downloading model: " + errorInfo; | 238 | qWarning(interfaceapp) << "Error downloading model: " + errorInfo; |
| @@ -257,7 +257,7 @@ void Application::addAssetToWorldUpload(QString filePath, QString mapping, bool · 18 unmodified lines | |||
| 257 | 257 | ||
| 258 | void Application::addAssetToWorldSetMapping(QString filePath, QString mapping, QString hash, bool isZip) { | 258 | void Application::addAssetToWorldSetMapping(QString filePath, QString mapping, QString hash, bool isZip) { |
| 259 | auto request = DependencyManager::get<AssetClient>()->createSetMappingRequest(mapping, hash); | 259 | auto request = DependencyManager::get<AssetClient>()->createSetMappingRequest(mapping, hash); |
| 260 | connect(request, &SetMappingRequest::finished, this, [=](SetMappingRequest* request) mutable { | 260 | connect(request, &SetMappingRequest::finished, this, [=, this](SetMappingRequest* request) mutable { |
| 261 | if (request->getError() != SetMappingRequest::NoError) { | 261 | if (request->getError() != SetMappingRequest::NoError) { |
| 262 | QString errorInfo = "Could not set asset mapping."; | 262 | QString errorInfo = "Could not set asset mapping."; |
| 263 | qWarning(interfaceapp) << "Error downloading model: " + errorInfo; | 263 | qWarning(interfaceapp) << "Error downloading model: " + errorInfo; |