aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/help/indexwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/help/indexwindow.cpp')
-rw-r--r--src/shared/help/indexwindow.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/shared/help/indexwindow.cpp b/src/shared/help/indexwindow.cpp
index f55ce3091b..f30158cd61 100644
--- a/src/shared/help/indexwindow.cpp
+++ b/src/shared/help/indexwindow.cpp
@@ -47,6 +47,11 @@
#include <QHelpEngine>
#include <QHelpIndexModel>
+#ifdef HELP_NEW_FILTER_ENGINE
+#include <QHelpLink>
+#endif
+
+
using namespace Help::Internal;
IndexWindow::IndexWindow()
@@ -195,8 +200,16 @@ void IndexWindow::disableSearchLineEdit()
void IndexWindow::open(const QModelIndex &index, bool newPage)
{
- QString keyword = m_filteredIndexModel->data(index, Qt::DisplayRole).toString();
- QMap<QString, QUrl> links = LocalHelpManager::helpEngine().indexModel()->linksForKeyword(keyword);
+ const QString keyword = m_filteredIndexModel->data(index, Qt::DisplayRole).toString();
+#ifndef HELP_NEW_FILTER_ENGINE
+ QMultiMap<QString, QUrl> links = LocalHelpManager::helpEngine().linksForKeyword(keyword);
+#else
+ QMultiMap<QString, QUrl> links;
+ const QList<QHelpLink> docs = LocalHelpManager::helpEngine().documentsForKeyword(keyword);
+ for (const auto &doc : docs)
+ links.insert(doc.title, doc.url);
+
+#endif
emit linksActivated(links, keyword, newPage);
}