forked from qt-creator/qt-creator
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:
@@ -357,8 +357,12 @@ void WelcomeMode::initPlugins()
|
|||||||
addPage(page);
|
addPage(page);
|
||||||
|
|
||||||
if (!m_activePage.isValid() && !m_pageButtons.isEmpty()) {
|
if (!m_activePage.isValid() && !m_pageButtons.isEmpty()) {
|
||||||
m_activePage = m_pluginList.at(0)->id();
|
const int welcomeIndex = Utils::indexOf(m_pluginList,
|
||||||
m_pageButtons.at(0)->click();
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user