mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
fix removal of requestHash method during cherry-pick
This commit is contained in:
parent
e6ce517041
commit
4bf69f20b7
2 changed files with 13 additions and 8 deletions
|
@ -46,16 +46,17 @@ void AssetResourceRequest::doSend() {
|
||||||
// We've detected that this is a hash - simply use AssetClient to request that asset
|
// We've detected that this is a hash - simply use AssetClient to request that asset
|
||||||
auto parts = _url.path().split(".", QString::SkipEmptyParts);
|
auto parts = _url.path().split(".", QString::SkipEmptyParts);
|
||||||
auto hash = parts.length() > 0 ? parts[0] : "";
|
auto hash = parts.length() > 0 ? parts[0] : "";
|
||||||
auto extension = parts.length() > 1 ? parts[1] : "";
|
|
||||||
|
|
||||||
// in case we haven't parsed a valid hash, return an error now
|
requestHash(hash);
|
||||||
if (hash.length() != SHA256_HASH_HEX_LENGTH) {
|
}
|
||||||
_result = InvalidURL;
|
}
|
||||||
_state = Finished;
|
|
||||||
|
|
||||||
emit finished();
|
void AssetResourceRequest::requestHash(const QString& hash) {
|
||||||
return;
|
|
||||||
}
|
// in case we haven't parsed a valid hash, return an error now
|
||||||
|
if (hash.length() != SHA256_HASH_HEX_LENGTH) {
|
||||||
|
_result = InvalidURL;
|
||||||
|
_state = Finished;
|
||||||
|
|
||||||
emit finished();
|
emit finished();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -30,6 +30,10 @@ private slots:
|
||||||
void onDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
|
void onDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool urlIsAssetPath() const;
|
||||||
|
|
||||||
|
void requestHash(const QString& hash);
|
||||||
|
|
||||||
AssetRequest* _assetRequest { nullptr };
|
AssetRequest* _assetRequest { nullptr };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue