From 7442790934c66e776f30a60a51048338c055928a Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 9 Jul 2018 11:05:16 +0200 Subject: [PATCH] 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 Reviewed-by: Alessandro Portale --- src/plugins/welcome/welcomeplugin.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index b3c70ed984d..aa804bbe6d8 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(); } }