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
No known key found for this signature in database
GPG key ID: 5E39D70B4C93C38E
11 changed files with 20 additions and 38 deletions

View file

@ -6,8 +6,6 @@
#include "modplatform/ModIndex.h"
static ModPlatform::ProviderCapabilities ProviderCaps;
ChooseProviderDialog::ChooseProviderDialog(QWidget* parent, bool single_choice, bool allow_skipping)
: QDialog(parent), ui(new Ui::ChooseProviderDialog)
{
@ -78,7 +76,7 @@ void ChooseProviderDialog::addProviders()
QRadioButton* btn;
for (auto& provider : { ModPlatform::ResourceProvider::MODRINTH, ModPlatform::ResourceProvider::FLAME }) {
btn = new QRadioButton(ProviderCaps.readableName(provider), this);
btn = new QRadioButton(ModPlatform::ProviderCapabilities::readableName(provider), this);
m_providers.addButton(btn, btn_index++);
ui->providersLayout->addWidget(btn);
}