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

@ -919,6 +919,8 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
{
return;
}
updateCapabilities();
performMainStartupAction();
}
@ -1564,14 +1566,13 @@ shared_qobject_ptr<Meta::Index> Application::metadataIndex()
return m_metadataIndex;
}
Application::Capabilities Application::currentCapabilities()
void Application::updateCapabilities()
{
Capabilities c;
m_capabilities = None;
if (!getMSAClientID().isEmpty())
c |= SupportsMSA;
m_capabilities |= SupportsMSA;
if (!getFlameAPIKey().isEmpty())
c |= SupportsFlame;
return c;
m_capabilities |= SupportsFlame;
}
QString Application::getJarPath(QString jarFile)