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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user