NOISSUE Some happy little refactors
This commit is contained in:
@ -24,7 +24,7 @@ void AssetUpdateTask::executeTask()
|
||||
QString localPath = assets->id + ".json";
|
||||
auto job = new NetJob(tr("Asset index for %1").arg(m_inst->name()));
|
||||
|
||||
auto metacache = ENV.metacache();
|
||||
auto metacache = ENV->metacache();
|
||||
auto entry = metacache->resolveEntry("asset_indexes", localPath);
|
||||
entry->setStale(true);
|
||||
auto hexSha1 = assets->sha1.toLatin1();
|
||||
@ -62,7 +62,7 @@ void AssetUpdateTask::assetIndexFinished()
|
||||
// FIXME: this looks like a job for a generic validator based on json schema?
|
||||
if (!AssetsUtils::loadAssetsIndexJson(assets->id, asset_fname, index))
|
||||
{
|
||||
auto metacache = ENV.metacache();
|
||||
auto metacache = ENV->metacache();
|
||||
auto entry = metacache->resolveEntry("asset_indexes", assets->id + ".json");
|
||||
metacache->evictEntry(entry);
|
||||
emitFailed(tr("Failed to read the assets index!"));
|
||||
|
@ -60,7 +60,7 @@ void FMLLibrariesTask::executeTask()
|
||||
// download missing libs to our place
|
||||
setStatus(tr("Downloading FML libraries..."));
|
||||
auto dljob = new NetJob("FML libraries");
|
||||
auto metacache = ENV.metacache();
|
||||
auto metacache = ENV->metacache();
|
||||
for (auto &lib : fmlLibsToProcess)
|
||||
{
|
||||
auto entry = metacache->resolveEntry("fmllibs", lib.filename);
|
||||
@ -87,7 +87,7 @@ void FMLLibrariesTask::fmllibsFinished()
|
||||
{
|
||||
setStatus(tr("Copying FML libraries into the instance..."));
|
||||
MinecraftInstance *inst = (MinecraftInstance *)m_inst;
|
||||
auto metacache = ENV.metacache();
|
||||
auto metacache = ENV->metacache();
|
||||
int index = 0;
|
||||
for (auto &lib : fmlLibsToProcess)
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ void LibrariesTask::executeTask()
|
||||
auto job = new NetJob(tr("Libraries for instance %1").arg(inst->name()));
|
||||
downloadJob.reset(job);
|
||||
|
||||
auto metacache = ENV.metacache();
|
||||
auto metacache = ENV->metacache();
|
||||
|
||||
auto processArtifactPool = [&](const QList<LibraryPtr> & pool, QStringList & errors, const QString & localPath)
|
||||
{
|
||||
|
Reference in New Issue
Block a user