Showing the changes to interface/src/scripting/GlobalServicesScriptingInterface.cpp (1 of 4 files). Show all
Unified · Split
| @@ -122,8 +122,8 @@ void DownloadInfoResultFromScriptValue(const QScriptValue& object, DownloadInfoR · 121 unmodified lines | |||
| 122 | 122 | ||
| 123 | DownloadInfoResult GlobalServicesScriptingInterface::getDownloadInfo() { | 123 | DownloadInfoResult GlobalServicesScriptingInterface::getDownloadInfo() { |
| 124 | DownloadInfoResult result; | 124 | DownloadInfoResult result; |
| 125 | foreach(QSharedPointer<Resource> resource, ResourceCache::getLoadingRequests()) { | 125 | foreach(auto resource, ResourceCache::getLoadingRequests()) { |
| 126 | result.downloading.append(resource ? (resource->getProgress() * 100.0f) : 0.0f); | 126 | result.downloading.append(resource->getProgress() * 100.0f); |
| 127 | } | 127 | } |
| 128 | result.pending = ResourceCache::getPendingRequestCount(); | 128 | result.pending = ResourceCache::getPendingRequestCount(); |
| 129 | return result; | 129 | return result; |