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:
Jarek Kobus
2019-10-16 13:28:28 +02:00
parent bf6ecbb042
commit 9ca7326d90
21 changed files with 352 additions and 36 deletions

View File

@@ -31,9 +31,12 @@
#include <QMutex>
#include <QObject>
#include <QUrl>
#ifndef HELP_NEW_FILTER_ENGINE
#include <QStandardItemModel>
#include <functional>
#else
QT_FORWARD_DECLARE_CLASS(QHelpFilterEngine)
#endif
QT_FORWARD_DECLARE_CLASS(QHelpEngine)
@@ -116,17 +119,23 @@ public:
static QByteArray loadErrorMessage(const QUrl &url, const QString &errorString);
Q_INVOKABLE static Help::Internal::LocalHelpManager::HelpData helpData(const QUrl &url);
#ifndef HELP_NEW_FILTER_ENGINE
static QAbstractItemModel *filterModel();
static void setFilterIndex(int index);
static int filterIndex();
static void updateFilterModel();
#else
static QHelpFilterEngine *filterEngine();
#endif
static bool canOpenOnlineHelp(const QUrl &url);
static bool openOnlineHelp(const QUrl &url);
signals:
#ifndef HELP_NEW_FILTER_ENGINE
void filterIndexChanged(int index);
#endif
void fallbackFontChanged(const QFont &font);
void returnOnCloseChanged();
void scrollWheelZoomingEnabledChanged(bool enabled);
@@ -136,9 +145,11 @@ private:
static bool m_guiNeedsSetup;
static bool m_needsCollectionFile;
#ifndef HELP_NEW_FILTER_ENGINE
static QStandardItemModel *m_filterModel;
static QString m_currentFilter;
static int m_currentFilterIndex;
#endif
static QMutex m_guiMutex;
static QHelpEngine *m_guiEngine;