refactor: make mod metadata presence (or lack of) easier to find out

This commit is contained in:
flow
2022-04-20 18:45:39 -03:00
committed by flow
parent a99858c64d
commit 96e36f0604
6 changed files with 49 additions and 13 deletions

View File

@ -10,6 +10,7 @@ auto ProviderCapabilities::name(Provider p) -> const char*
case Provider::FLAME:
return "curseforge";
}
return {};
}
auto ProviderCapabilities::hashType(Provider p) -> QString
{
@ -19,6 +20,7 @@ auto ProviderCapabilities::hashType(Provider p) -> QString
case Provider::FLAME:
return "murmur2";
}
return {};
}
} // namespace ModPlatform

View File

@ -48,14 +48,9 @@ auto V1::createModFormat(QDir& index_dir, ::Mod& internal_mod) -> Mod
if(mod.isValid())
return mod;
// Manually construct packwiz mod
mod.name = internal_mod.name();
mod.filename = internal_mod.fileinfo().fileName();
qWarning() << QString("Tried to create mod metadata with a Mod without metadata!");
// TODO: Have a mechanism for telling the UI subsystem that we want to gather user information
// (i.e. which mod provider we want to use). Maybe an object parameter with a signal for that?
return mod;
return {};
}
void V1::updateModIndex(QDir& index_dir, Mod& mod)