Help/litehtml: Implement text search

Build an index between (visible) text and litehtml elements, so we can
use the regular text search functionality of Qt.

Change-Id: I2bf29628482f81c67b20b9a02d7808a330a073eb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2019-09-16 14:24:03 +02:00
parent 3f2c0f0a5a
commit dff7e1515a
5 changed files with 213 additions and 6 deletions

View File

@@ -198,8 +198,10 @@ void LiteHtmlHelpViewer::addForwardHistoryItems(QMenu *forwardMenu)
bool LiteHtmlHelpViewer::findText(
const QString &text, Core::FindFlags flags, bool incremental, bool fromSearch, bool *wrapped)
{
// TODO
return false;
return m_viewer->findText(text,
Core::textDocumentFlagsForFindFlags(flags),
incremental,
wrapped);
}
void LiteHtmlHelpViewer::copy()