mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 18:56:55 +02:00
Merge pull request #12615 from jherico/fix/ktx_loading
Fix local KTX files never being removed from pending downloads
This commit is contained in:
commit
f48db825c3
2 changed files with 7 additions and 0 deletions
|
@ -459,6 +459,10 @@ void NetworkTexture::makeRequest() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NetworkTexture::handleLocalRequestCompleted() {
|
||||||
|
TextureCache::requestCompleted(_self);
|
||||||
|
}
|
||||||
|
|
||||||
void NetworkTexture::makeLocalRequest() {
|
void NetworkTexture::makeLocalRequest() {
|
||||||
const QString scheme = _url.scheme();
|
const QString scheme = _url.scheme();
|
||||||
QString path;
|
QString path;
|
||||||
|
@ -468,6 +472,8 @@ void NetworkTexture::makeLocalRequest() {
|
||||||
path = ":" + _url.path();
|
path = ":" + _url.path();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
connect(this, &Resource::finished, this, &NetworkTexture::handleLocalRequestCompleted);
|
||||||
|
|
||||||
path = FileUtils::selectFile(path);
|
path = FileUtils::selectFile(path);
|
||||||
|
|
||||||
auto storage = std::make_shared<storage::FileStorage>(path);
|
auto storage = std::make_shared<storage::FileStorage>(path);
|
||||||
|
|
|
@ -71,6 +71,7 @@ public slots:
|
||||||
protected:
|
protected:
|
||||||
void makeRequest() override;
|
void makeRequest() override;
|
||||||
void makeLocalRequest();
|
void makeLocalRequest();
|
||||||
|
Q_INVOKABLE void handleLocalRequestCompleted();
|
||||||
|
|
||||||
virtual bool isCacheable() const override { return _loaded; }
|
virtual bool isCacheable() const override { return _loaded; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue