mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
CR
This commit is contained in:
parent
785eda44cd
commit
4ed8573f74
4 changed files with 4 additions and 4 deletions
|
@ -122,7 +122,7 @@ void DownloadInfoResultFromScriptValue(const QScriptValue& object, DownloadInfoR
|
|||
|
||||
DownloadInfoResult GlobalServicesScriptingInterface::getDownloadInfo() {
|
||||
DownloadInfoResult result;
|
||||
foreach(auto resource, ResourceCache::getLoadingRequests()) {
|
||||
foreach(const auto& resource, ResourceCache::getLoadingRequests()) {
|
||||
result.downloading.append(resource->getProgress() * 100.0f);
|
||||
}
|
||||
result.pending = ResourceCache::getPendingRequestCount();
|
||||
|
|
|
@ -214,7 +214,7 @@ void Stats::updateStats(bool force) {
|
|||
// If the urls have changed, update the list
|
||||
if (shouldUpdateUrls) {
|
||||
_downloadUrls.clear();
|
||||
foreach (auto resource, loadingRequests) {
|
||||
foreach (const auto& resource, loadingRequests) {
|
||||
_downloadUrls << resource->getURL().toString();
|
||||
}
|
||||
emit downloadUrlsChanged();
|
||||
|
|
|
@ -295,7 +295,7 @@ bool ResourceCache::attemptRequest(QSharedPointer<Resource> resource) {
|
|||
return true;
|
||||
}
|
||||
|
||||
void ResourceCache::requestCompleted(QSharedPointer<Resource> resource) {
|
||||
void ResourceCache::requestCompleted(QWeakPointer<Resource> resource) {
|
||||
auto sharedItems = DependencyManager::get<ResourceCacheSharedItems>();
|
||||
sharedItems->removeRequest(resource);
|
||||
--_requestsActive;
|
||||
|
|
|
@ -141,7 +141,7 @@ protected:
|
|||
/// Attempt to load a resource if requests are below the limit, otherwise queue the resource for loading
|
||||
/// \return true if the resource began loading, otherwise false if the resource is in the pending queue
|
||||
static bool attemptRequest(QSharedPointer<Resource> resource);
|
||||
static void requestCompleted(QSharedPointer<Resource> resource);
|
||||
static void requestCompleted(QWeakPointer<Resource> resource);
|
||||
static bool attemptHighestPriorityRequest();
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue