Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 14 files). Show all
Unified · Split
| @@ -684,22 +684,8 @@ bool EntityScriptingInterface::getServerScriptStatus(QUuid entityID, QScriptValu · 683 unmodified lines | |||
| 684 | auto client = DependencyManager::get<EntityScriptClient>(); | 684 | auto client = DependencyManager::get<EntityScriptClient>(); |
| 685 | auto request = client->createScriptStatusRequest(entityID); | 685 | auto request = client->createScriptStatusRequest(entityID); |
| 686 | connect(request, &GetScriptStatusRequest::finished, callback.engine(), [callback](GetScriptStatusRequest* request) mutable { | 686 | connect(request, &GetScriptStatusRequest::finished, callback.engine(), [callback](GetScriptStatusRequest* request) mutable { |
| 687 | QString statusString; | 687 | QString statusString = EntityScriptStatus_::valueToKey(request->getStatus());; |
| 688 | switch (request->getStatus()) { | 688 | QScriptValueList args { request->getResponseReceived(), request->getIsRunning(), statusString.toLower(), request->getErrorInfo() }; |
| 689 | case RUNNING: | ||
| 690 | statusString = "running"; | ||
| 691 | break; | ||
| 692 | case ERROR_LOADING_SCRIPT: | ||
| 693 | statusString = "error_loading_script"; | ||
| 694 | break; | ||
| 695 | case ERROR_RUNNING_SCRIPT: | ||
| 696 | statusString = "error_running_script"; | ||
| 697 | break; | ||
| 698 | default: | ||
| 699 | statusString = ""; | ||
| 700 | break; | ||
| 701 | } | ||
| 702 | QScriptValueList args { request->getResponseReceived(), request->getIsRunning(), statusString, request->getErrorInfo() }; | ||
| 703 | callback.call(QScriptValue(), args); | 689 | callback.call(QScriptValue(), args); |
| 704 | request->deleteLater(); | 690 | request->deleteLater(); |
| 705 | }); | 691 | }); |