mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
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
2666beafb1
commit
98fbb3613d
7 changed files with 102 additions and 47 deletions
|
|
@ -121,9 +121,9 @@ QList<BasePage *> ModDownloadDialog::getPages()
|
|||
{
|
||||
QList<BasePage *> pages;
|
||||
|
||||
pages.append(new ModrinthModPage(this, m_instance));
|
||||
pages.append(ModrinthModPage::create(this, m_instance));
|
||||
if (APPLICATION->currentCapabilities() & 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