refactor: override / mask static make functions for ApiDownload

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers
2023-06-01 20:15:39 -07:00
parent 9c10965997
commit 418677ef31
11 changed files with 101 additions and 26 deletions

View File

@ -96,6 +96,8 @@ void Download::addValidator(Validator* v)
void Download::executeTask()
{
init();
setStatus(tr("Downloading %1").arg(StringUtils::truncateUrlHumanFriendly(m_url, 80)));
if (getState() == Task::State::AbortedByUser) {
@ -124,7 +126,8 @@ void Download::executeTask()
}
request.setHeader(QNetworkRequest::UserAgentHeader, APPLICATION->getUserAgent().toUtf8());
for ( auto header_proxy : m_headerProxies ) {
for ( auto& header_proxy : m_headerProxies ) {
header_proxy->writeHeaders(request);
}
// TODO remove duplication