diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-07-09 11:05:16 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-07-09 10:26:02 +0000 |
commit | 7442790934c66e776f30a60a51048338c055928a (patch) | |
tree | 2ba9b1e85395bb214eb7b137e246e0cb95aba872 | |
parent | 3bf887c2ad0e9a20c35356d992dedfed52602b47 (diff) |
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>
-rw-r--r-- | src/plugins/welcome/welcomeplugin.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index b3c70ed984..aa804bbe6d 100644 --- a/src/plugins/welcome/welcomeplugin.cpp +++ b/src/plugins/welcome/welcomeplugin.cpp @@ -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(); } } |