fix removal of requestHash method during cherry-pick

This commit is contained in:
Stephen Birarda 2016-03-07 13:59:17 -08:00
parent e6ce517041
commit 4bf69f20b7
2 changed files with 13 additions and 8 deletions

View file

@ -46,16 +46,17 @@ void AssetResourceRequest::doSend() {
// We've detected that this is a hash - simply use AssetClient to request that asset
auto parts = _url.path().split(".", QString::SkipEmptyParts);
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
if (hash.length() != SHA256_HASH_HEX_LENGTH) {
_result = InvalidURL;
_state = Finished;
requestHash(hash);
}
}
emit finished();
return;
}
void AssetResourceRequest::requestHash(const QString& hash) {
// 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();
return;

View file

@ -30,6 +30,10 @@ private slots:
void onDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
private:
bool urlIsAssetPath() const;
void requestHash(const QString& hash);
AssetRequest* _assetRequest { nullptr };
};