refactor: create mod pages and filter widget by factory methods

This takes most expensive operations out of the constructors.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow committed 2022-09-07 08:29:58 -03:00
1 parent 8a65726e9d
commit 42eb265624
7 files changed
+102 -46

No files matched your search

+2 -2
View File
@@ -127,9 +127,9 @@ QList<BasePage*> ModDownloadDialog::getPages()
{
QList<BasePage*> pages;
pages.append(new ModrinthModPage(this, m_instance));
pages.append(ModrinthModPage::create(this, m_instance));
if (APPLICATION->capabilities() & Application::SupportsFlame)
pages.append(new FlameModPage(this, m_instance));
pages.append(FlameModPage::create(this, m_instance));
return pages;
}