NOISSUE remove unneeded URL fixing code and fix up the exception thrown by invalid Flame URLs
This commit is contained in:
parent
418251bd86
commit
088e8e0eff
@ -48,12 +48,11 @@ void Flame::FileResolvingTask::netJobFinished()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
out.fileName = Json::requireString(obj, "FileNameOnDisk");
|
out.fileName = Json::requireString(obj, "FileNameOnDisk");
|
||||||
auto urlString = Json::requireString(obj, "DownloadURL");
|
QString rawUrl = Json::requireString(obj, "DownloadURL");
|
||||||
urlString.replace(' ', "%20");
|
out.url = QUrl(rawUrl, QUrl::TolerantMode);
|
||||||
out.url = QUrl(urlString, QUrl::StrictMode);
|
|
||||||
if(!out.url.isValid())
|
if(!out.url.isValid())
|
||||||
{
|
{
|
||||||
throw "Perkele!";
|
throw JSONValidationError(QString("Invalid URL: %1").arg(rawUrl));
|
||||||
}
|
}
|
||||||
// This is a piece of a Flame project JSON pulled out into the file metadata (here) for convenience
|
// This is a piece of a Flame project JSON pulled out into the file metadata (here) for convenience
|
||||||
// It is also optional
|
// It is also optional
|
||||||
|
Loading…
x
Reference in New Issue
Block a user