mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 07:22:31 +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() {
|
||||
const QString scheme = _url.scheme();
|
||||
QString path;
|
||||
|
@ -468,6 +472,8 @@ void NetworkTexture::makeLocalRequest() {
|
|||
path = ":" + _url.path();
|
||||
}
|
||||
|
||||
connect(this, &Resource::finished, this, &NetworkTexture::handleLocalRequestCompleted);
|
||||
|
||||
path = FileUtils::selectFile(path);
|
||||
|
||||
auto storage = std::make_shared<storage::FileStorage>(path);
|
||||
|
|
|
@ -71,6 +71,7 @@ public slots:
|
|||
protected:
|
||||
void makeRequest() override;
|
||||
void makeLocalRequest();
|
||||
Q_INVOKABLE void handleLocalRequestCompleted();
|
||||
|
||||
virtual bool isCacheable() const override { return _loaded; }
|
||||
|
||||
|
|
Loading…
Reference in a new issue