Merge pull request #12615 from jherico/fix/ktx_loading

Fix local KTX files never being removed from pending downloads
This commit is contained in:
Bradley Austin Davis 2018-03-12 15:04:40 -07:00 committed by GitHub
commit f48db825c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -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);

View file

@ -71,6 +71,7 @@ public slots:
protected:
void makeRequest() override;
void makeLocalRequest();
Q_INVOKABLE void handleLocalRequestCompleted();
virtual bool isCacheable() const override { return _loaded; }