diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2018-07-27 15:06:43 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2018-11-12 09:08:58 +0000 |
commit | 1f0b89f8e8da682a4bf0f82c077c363b4d43a707 (patch) | |
tree | b9d0f5bf3b1796c8ccfe62e3b9f49c8dcfee677e /src/assistant/help/qhelpengine.cpp | |
parent | 2095b1598ebe1d3ee91f9eeb1f7a13a4cbbf36f9 (diff) |
Add new filter API, enclosed in QHelpFilterEngine
Implement new filter mechanism and provide component
filtering.
Task-number: QTCREATORBUG-19724
Task-number: QTCREATORBUG-7301
Change-Id: I48400e3bc969495a66c3002fed13a7c3ddb1e249
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'src/assistant/help/qhelpengine.cpp')
-rw-r--r-- | src/assistant/help/qhelpengine.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/assistant/help/qhelpengine.cpp b/src/assistant/help/qhelpengine.cpp index 28825e2ed..19e44cd91 100644 --- a/src/assistant/help/qhelpengine.cpp +++ b/src/assistant/help/qhelpengine.cpp @@ -44,6 +44,7 @@ #include "qhelpindexwidget.h" #include "qhelpsearchengine.h" #include "qhelpcollectionhandler_p.h" +#include "qhelpfilterengine.h" #include <QtCore/QDir> #include <QtCore/QFile> @@ -68,6 +69,8 @@ void QHelpEnginePrivate::init(const QString &collectionFile, this, &QHelpEnginePrivate::scheduleApplyCurrentFilter); connect(helpEngineCore, &QHelpEngineCore::currentFilterChanged, this, &QHelpEnginePrivate::scheduleApplyCurrentFilter); + connect(helpEngineCore->filterEngine(), &QHelpFilterEngine::filterActivated, + this, &QHelpEnginePrivate::scheduleApplyCurrentFilter); } void QHelpEnginePrivate::scheduleApplyCurrentFilter() @@ -85,8 +88,11 @@ void QHelpEnginePrivate::scheduleApplyCurrentFilter() void QHelpEnginePrivate::applyCurrentFilter() { m_isApplyCurrentFilterScheduled = false; - contentModel->createContents(currentFilter); - indexModel->createIndex(currentFilter); + const QString filter = usesFilterEngine + ? q->filterEngine()->activeFilter() + : currentFilter; + contentModel->createContents(filter); + indexModel->createIndex(filter); } void QHelpEnginePrivate::setContentsWidgetBusy() |