aboutsummaryrefslogtreecommitdiff
path: root/launcher/pages/modplatform/technic
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/pages/modplatform/technic')
-rw-r--r--launcher/pages/modplatform/technic/TechnicModel.cpp9
-rw-r--r--launcher/pages/modplatform/technic/TechnicModel.h2
-rw-r--r--launcher/pages/modplatform/technic/TechnicPage.cpp4
3 files changed, 7 insertions, 8 deletions
diff --git a/launcher/pages/modplatform/technic/TechnicModel.cpp b/launcher/pages/modplatform/technic/TechnicModel.cpp
index a07395ef..63c2d4c4 100644
--- a/launcher/pages/modplatform/technic/TechnicModel.cpp
+++ b/launcher/pages/modplatform/technic/TechnicModel.cpp
@@ -14,7 +14,6 @@
*/
#include "TechnicModel.h"
-#include "Env.h"
#include "Application.h"
#include "Json.h"
@@ -105,7 +104,7 @@ void Technic::ListModel::performSearch()
}
netJob->addNetAction(Net::Download::makeByteArray(QUrl(searchUrl), &response));
jobPtr = netJob;
- jobPtr->start();
+ jobPtr->start(APPLICATION->network());
QObject::connect(netJob, &NetJob::succeeded, this, &ListModel::searchRequestFinished);
QObject::connect(netJob, &NetJob::failed, this, &ListModel::searchRequestFailed);
}
@@ -163,7 +162,7 @@ void Technic::ListModel::getLogo(const QString& logo, const QString& logoUrl, Te
{
if(m_logoMap.contains(logo))
{
- callback(ENV->metacache()->resolveEntry("TechnicPacks", QString("logos/%1").arg(logo))->getFullPath());
+ callback(APPLICATION->metacache()->resolveEntry("TechnicPacks", QString("logos/%1").arg(logo))->getFullPath());
}
else
{
@@ -216,7 +215,7 @@ void Technic::ListModel::requestLogo(QString logo, QString url)
return;
}
- MetaEntryPtr entry = ENV->metacache()->resolveEntry("TechnicPacks", QString("logos/%1").arg(logo));
+ MetaEntryPtr entry = APPLICATION->metacache()->resolveEntry("TechnicPacks", QString("logos/%1").arg(logo));
NetJob *job = new NetJob(QString("Technic Icon Download %1").arg(logo));
job->addNetAction(Net::Download::makeCached(QUrl(url), entry));
@@ -232,7 +231,7 @@ void Technic::ListModel::requestLogo(QString logo, QString url)
logoFailed(logo);
});
- job->start();
+ job->start(APPLICATION->network());
m_loadingLogos.append(logo);
}
diff --git a/launcher/pages/modplatform/technic/TechnicModel.h b/launcher/pages/modplatform/technic/TechnicModel.h
index 82a03842..e80e6e7c 100644
--- a/launcher/pages/modplatform/technic/TechnicModel.h
+++ b/launcher/pages/modplatform/technic/TechnicModel.h
@@ -63,7 +63,7 @@ private:
ResetRequested,
Finished
} searchState = None;
- NetJobPtr jobPtr;
+ NetJob::Ptr jobPtr;
QByteArray response;
};
diff --git a/launcher/pages/modplatform/technic/TechnicPage.cpp b/launcher/pages/modplatform/technic/TechnicPage.cpp
index 2befda04..1e4f4106 100644
--- a/launcher/pages/modplatform/technic/TechnicPage.cpp
+++ b/launcher/pages/modplatform/technic/TechnicPage.cpp
@@ -164,7 +164,7 @@ void TechnicPage::suggestCurrent()
current.metadataLoaded = true;
metadataLoaded();
});
- netJob->start();
+ netJob->start(APPLICATION->network());
}
// expects current.metadataLoaded to be true
@@ -193,6 +193,6 @@ void TechnicPage::metadataLoaded()
else
{
while (current.url.endsWith('/')) current.url.chop(1);
- dialog->setSuggestedPack(current.name, new Technic::SolderPackInstallTask(current.url + "/modpack/" + current.slug, current.minecraftVersion));
+ dialog->setSuggestedPack(current.name, new Technic::SolderPackInstallTask(APPLICATION->network(), current.url + "/modpack/" + current.slug, current.minecraftVersion));
}
}