aboutsummaryrefslogtreecommitdiff
path: root/launcher/net/Download.cpp
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-06-01 20:15:39 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-06-25 11:09:25 -0700
commit418677ef310ebde9e2ce6fa98e224b6d4d1aa9f4 (patch)
tree77a13e01c91575bced101f6b899577d6294d5596 /launcher/net/Download.cpp
parent9c10965997d873b0de56deef5d5ec5e768db1d8f (diff)
downloadPrismLauncher-418677ef310ebde9e2ce6fa98e224b6d4d1aa9f4.tar.gz
PrismLauncher-418677ef310ebde9e2ce6fa98e224b6d4d1aa9f4.tar.bz2
PrismLauncher-418677ef310ebde9e2ce6fa98e224b6d4d1aa9f4.zip
refactor: override / mask static `make` functions for ApiDownload
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/net/Download.cpp')
-rw-r--r--launcher/net/Download.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/launcher/net/Download.cpp b/launcher/net/Download.cpp
index 6c217379..071a9659 100644
--- a/launcher/net/Download.cpp
+++ b/launcher/net/Download.cpp
@@ -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