Fix local KTX files never being removed from pending downloads

This commit is contained in:
Brad Davis 2018-03-09 15:19:48 -08:00
parent 6969f014fc
commit 7d267bb709
2 changed files with 8 additions and 0 deletions
libraries/model-networking/src/model-networking

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,9 @@ void NetworkTexture::makeLocalRequest() {
path = ":" + _url.path();
}
auto self = _self;
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; }