Base class for resource caches.
More...
#include <ResourceCache.h>
|
class | Resource |
|
class | ScriptableResourceCache |
|
Base class for resource caches.
◆ attemptRequest()
bool ResourceCache::attemptRequest |
( |
QSharedPointer< Resource > |
resource | ) |
|
|
staticprotected |
Attempt to load a resource if requests are below the limit, otherwise queue the resource for loading
- Returns
- true if the resource began loading, otherwise false if the resource is in the pending queue
◆ getResource
QSharedPointer<Resource> ResourceCache::getResource |
( |
const QUrl & |
url, |
|
|
const QUrl & |
fallback = QUrl() |
|
) |
| |
|
inlineprotectedslot |
Loads a resource from the specified URL and returns it. If the caller is on a different thread than the ResourceCache, returns an empty smart pointer and loads its asynchronously.
- Parameters
-
fallback | a fallback URL to load if the desired one is unavailable |
The documentation for this class was generated from the following files: