Welcome: Fix logic for page order

If we want to rely on the priority for ordering
the buttons of the welcome page we should also
keep the order of the pages in sync with the
buttons.

Change-Id: Idcb06f18c6e7ea7c8fd19eac46c53abbed2b9dbd
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2020-01-14 10:57:05 +01:00
committed by hjk
parent 38cd7b1aa0
commit 938068d1e8

View File

@@ -413,7 +413,7 @@ void WelcomeMode::addPage(IWelcomePage *page)
pageButton->setText(page->title()); pageButton->setText(page->title());
pageButton->setActiveChecker([this, pageId] { return m_activePage == pageId; }); pageButton->setActiveChecker([this, pageId] { return m_activePage == pageId; });
m_pluginList.append(page); m_pluginList.insert(idx, page);
m_pageButtons.append(pageButton); m_pageButtons.append(pageButton);
m_sideBar->m_pluginButtons->insertWidget(idx, pageButton); m_sideBar->m_pluginButtons->insertWidget(idx, pageButton);