forked from qt-creator/qt-creator
welcome screen: populate example combobox
When an example is selected, help and the project are opened in a split view. We try to read the xml file provided for QtDemo to extract details about the examples provided. Will try all available Qts, starting with the default version. Will fail gracefully (provide a message and disable controls) if examples or demos cannot be found. Will work if help is not found, but show an error.
This commit is contained in:
@@ -526,6 +526,7 @@ void HelpPlugin::extensionsInitialized()
|
||||
|
||||
if (Core::Internal::WelcomeMode *welcomeMode = qobject_cast<Core::Internal::WelcomeMode*>(m_core->modeManager()->mode(Core::Constants::MODE_WELCOME))) {
|
||||
connect(welcomeMode, SIGNAL(openHelpPage(const QString&)), this, SLOT(openHelpPage(const QString&)));
|
||||
connect(welcomeMode, SIGNAL(openContextHelpPage(const QString&)), this, SLOT(openContextHelpPage(QString)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -557,6 +558,12 @@ void HelpPlugin::modeChanged(Core::IMode *mode)
|
||||
}
|
||||
}
|
||||
|
||||
void HelpPlugin::openContextHelpPage(const QString &url)
|
||||
{
|
||||
Core::RightPaneWidget::instance()->setShown(true);
|
||||
m_helpViewerForSideBar->setSource(QUrl(url));
|
||||
}
|
||||
|
||||
void HelpPlugin::activateContext()
|
||||
{
|
||||
using namespace Core;
|
||||
|
||||
Reference in New Issue
Block a user