forked from qt-creator/qt-creator
Integrate new filter engine
Adapt the code to deprecated usage of map as a multi map, hence all cases replaced by QMultiMap. Change-Id: I2d480467cd6e91d3e880555e6a21058dec056b3f Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
This commit is contained in:
@@ -116,7 +116,7 @@ public:
|
||||
void activateContents();
|
||||
|
||||
void saveExternalWindowSettings();
|
||||
void showLinksInCurrentViewer(const QMap<QString, QUrl> &links, const QString &key);
|
||||
void showLinksInCurrentViewer(const QMultiMap<QString, QUrl> &links, const QString &key);
|
||||
|
||||
void setupHelpEngineIfNeeded();
|
||||
|
||||
@@ -124,7 +124,10 @@ public:
|
||||
|
||||
void slotSystemInformation();
|
||||
|
||||
#ifndef HELP_NEW_FILTER_ENGINE
|
||||
void resetFilter();
|
||||
#endif
|
||||
|
||||
static void activateHelpMode() { ModeManager::activateMode(Constants::ID_MODE_HELP); }
|
||||
static bool canShowHelpSideBySide();
|
||||
|
||||
@@ -314,6 +317,8 @@ ExtensionSystem::IPlugin::ShutdownFlag HelpPlugin::aboutToShutdown()
|
||||
return SynchronousShutdown;
|
||||
}
|
||||
|
||||
#ifndef HELP_NEW_FILTER_ENGINE
|
||||
|
||||
void HelpPluginPrivate::resetFilter()
|
||||
{
|
||||
const QString &filterInternal = QString::fromLatin1("Qt Creator %1.%2.%3")
|
||||
@@ -348,6 +353,8 @@ void HelpPluginPrivate::resetFilter()
|
||||
LocalHelpManager::instance(), &LocalHelpManager::updateFilterModel);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void HelpPluginPrivate::saveExternalWindowSettings()
|
||||
{
|
||||
if (!m_externalWindow)
|
||||
@@ -436,7 +443,7 @@ HelpWidget *HelpPlugin::modeHelpWidget()
|
||||
return dd->m_centralWidget;
|
||||
}
|
||||
|
||||
void HelpPluginPrivate::showLinksInCurrentViewer(const QMap<QString, QUrl> &links, const QString &key)
|
||||
void HelpPluginPrivate::showLinksInCurrentViewer(const QMultiMap<QString, QUrl> &links, const QString &key)
|
||||
{
|
||||
if (links.size() < 1)
|
||||
return;
|
||||
@@ -577,7 +584,7 @@ void HelpPluginPrivate::showContextHelp(const HelpItem &contextHelp)
|
||||
} else if (links.size() == 1 && !contextHelp.isFuzzyMatch()) {
|
||||
showHelpUrl(links.front().second, LocalHelpManager::contextHelpOption());
|
||||
} else {
|
||||
QMap<QString, QUrl> map;
|
||||
QMultiMap<QString, QUrl> map;
|
||||
for (const HelpItem::Link &link : links)
|
||||
map.insert(link.first, link.second);
|
||||
auto tc = new TopicChooser(ICore::dialogParent(), contextHelp.keyword(), map);
|
||||
@@ -683,7 +690,9 @@ void HelpPluginPrivate::doSetupIfNeeded()
|
||||
{
|
||||
LocalHelpManager::setupGuiHelpEngine();
|
||||
if (m_setupNeeded) {
|
||||
#ifndef HELP_NEW_FILTER_ENGINE
|
||||
resetFilter();
|
||||
#endif
|
||||
m_setupNeeded = false;
|
||||
m_centralWidget->openPagesManager()->setupInitialPages();
|
||||
LocalHelpManager::bookmarkManager().setupBookmarkModels();
|
||||
|
||||
Reference in New Issue
Block a user