Show examples page in welcome mode on first start

This change might help first-time users getting started.

Task-number: QTCREATORBUG-20674
Change-Id: If55402160bf6b1515142bb64f281654fe4c68134
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Eike Ziller
2018-07-09 11:05:16 +02:00
parent 3bf887c2ad
commit 7442790934

View File

@@ -357,8 +357,12 @@ void WelcomeMode::initPlugins()
addPage(page);
if (!m_activePage.isValid() && !m_pageButtons.isEmpty()) {
m_activePage = m_pluginList.at(0)->id();
m_pageButtons.at(0)->click();
const int welcomeIndex = Utils::indexOf(m_pluginList,
Utils::equal(&IWelcomePage::id,
Core::Id("Examples")));
const int defaultIndex = welcomeIndex >= 0 ? welcomeIndex : 0;
m_activePage = m_pluginList.at(defaultIndex)->id();
m_pageButtons.at(defaultIndex)->click();
}
}