refactor: store current capabilities

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu
2022-08-08 20:49:49 +02:00
parent 75f92de8f8
commit f873cd5b1a
7 changed files with 17 additions and 11 deletions

View File

@ -122,7 +122,7 @@ QList<BasePage *> ModDownloadDialog::getPages()
QList<BasePage *> pages;
pages.append(new ModrinthModPage(this, m_instance));
if (APPLICATION->currentCapabilities() & Application::SupportsFlame)
if (APPLICATION->capabilities() & Application::SupportsFlame)
pages.append(new FlameModPage(this, m_instance));
return pages;

View File

@ -157,7 +157,7 @@ QList<BasePage *> NewInstanceDialog::getPages()
pages.append(new VanillaPage(this));
pages.append(importPage);
pages.append(new AtlPage(this));
if (APPLICATION->currentCapabilities() & Application::SupportsFlame)
if (APPLICATION->capabilities() & Application::SupportsFlame)
pages.append(new FlamePage(this));
pages.append(new FtbPage(this));
pages.append(new LegacyFTB::Page(this));

View File

@ -96,7 +96,7 @@ AccountListPage::AccountListPage(QWidget *parent)
updateButtonStates();
// Xbox authentication won't work without a client identifier, so disable the button if it is missing
if (~APPLICATION->currentCapabilities() & Application::SupportsMSA) {
if (~APPLICATION->capabilities() & Application::SupportsMSA) {
ui->actionAddMicrosoft->setVisible(false);
ui->actionAddMicrosoft->setToolTip(tr("No Microsoft Authentication client ID was set."));
}