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:
parent
8a65726e9d
commit
42eb265624
7 changed files with 102 additions and 46 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue