mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
Sanitize ResourceCache to expose to JS/QML
fix sanitize
This commit is contained in:
parent
4788bb453b
commit
d72c695417
2 changed files with 4 additions and 5 deletions
|
@ -588,9 +588,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
|
||||||
// Model background downloads need to happen on the Datagram Processor Thread. The idle loop will
|
// Model background downloads need to happen on the Datagram Processor Thread. The idle loop will
|
||||||
// emit checkBackgroundDownloads to cause the ModelCache to check it's queue for requested background
|
// emit checkBackgroundDownloads to cause the ModelCache to check it's queue for requested background
|
||||||
// downloads.
|
// downloads.
|
||||||
QSharedPointer<ModelCache> modelCacheP = DependencyManager::get<ModelCache>();
|
auto modelCache = DependencyManager::get<ModelCache>();
|
||||||
ResourceCache* modelCache = modelCacheP.data();
|
connect(this, &Application::checkBackgroundDownloads, modelCache.data(), &ModelCache::checkAsynchronousGets);
|
||||||
connect(this, &Application::checkBackgroundDownloads, modelCache, &ResourceCache::checkAsynchronousGets);
|
|
||||||
|
|
||||||
// put the audio processing on a separate thread
|
// put the audio processing on a separate thread
|
||||||
QThread* audioThread = new QThread();
|
QThread* audioThread = new QThread();
|
||||||
|
|
|
@ -109,7 +109,7 @@ protected:
|
||||||
/// \param fallback a fallback URL to load if the desired one is unavailable
|
/// \param fallback a fallback URL to load if the desired one is unavailable
|
||||||
/// \param delayLoad if true, don't load the resource immediately; wait until load is first requested
|
/// \param delayLoad if true, don't load the resource immediately; wait until load is first requested
|
||||||
/// \param extra extra data to pass to the creator, if appropriate
|
/// \param extra extra data to pass to the creator, if appropriate
|
||||||
Q_INVOKABLE QSharedPointer<Resource> getResource(const QUrl& url, const QUrl& fallback = QUrl(),
|
QSharedPointer<Resource> getResource(const QUrl& url, const QUrl& fallback = QUrl(),
|
||||||
bool delayLoad = false, void* extra = NULL);
|
bool delayLoad = false, void* extra = NULL);
|
||||||
|
|
||||||
/// Creates a new resource.
|
/// Creates a new resource.
|
||||||
|
@ -123,7 +123,7 @@ protected:
|
||||||
|
|
||||||
/// Attempt to load a resource if requests are below the limit, otherwise queue the resource for loading
|
/// 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
|
/// \return true if the resource began loading, otherwise false if the resource is in the pending queue
|
||||||
Q_INVOKABLE static bool attemptRequest(Resource* resource);
|
static bool attemptRequest(Resource* resource);
|
||||||
static void requestCompleted(Resource* resource);
|
static void requestCompleted(Resource* resource);
|
||||||
static bool attemptHighestPriorityRequest();
|
static bool attemptHighestPriorityRequest();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue