De-OOP ProviderCapabilities

There was no reason for it to be a class, and imo it created quite a code-smell needing to initialise it everywhere.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2024-01-26 03:01:02 +00:00
parent 97ee0a19b5
commit 82d0f204e2
11 changed files with 20 additions and 38 deletions

View File

@@ -125,8 +125,6 @@ void ResourceDownloadDialog::connectButtons()
connect(HelpButton, &QPushButton::clicked, m_container, &PageContainer::help);
}
static ModPlatform::ProviderCapabilities ProviderCaps;
void ResourceDownloadDialog::confirm()
{
auto confirm_dialog = ReviewMessageBox::create(this, tr("Confirm %1 to download").arg(resourcesString()));
@@ -167,7 +165,7 @@ void ResourceDownloadDialog::confirm()
});
for (auto& task : selected) {
confirm_dialog->appendResource({ task->getName(), task->getFilename(), task->getCustomPath(),
ProviderCaps.name(task->getProvider()), getRequiredBy.value(task->getPack()->addonId.toString()),
ModPlatform::ProviderCapabilities::name(task->getProvider()), getRequiredBy.value(task->getPack()->addonId.toString()),
task->getVersion().version_type.toString() });
}