diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2019-07-12 13:39:06 +0200 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2019-08-23 10:25:23 +0200 |
commit | a6abc01319798e2175914323273e91927516eba0 (patch) | |
tree | c7fe231f43e80cc4442c535442f41de1cd521fda /src/webengine/plugin/plugin.cpp | |
parent | 55a4c28542c6dc9e4a4edc0aab7043feef2ab0d2 (diff) |
Introduce findTextFinished signal
This is a replacement for the callbacks. Also introduces
QWebEngineFindTextResult class what is common for the Quick and Widget
APIs. This makes possible to provide extra information about the match,
eg. the number of matches and the index of the currently highlighted match.
[ChangeLog][QtWebEngine][WebEngineView] Introduces findTextFinished
signal and FindTextResult type to provide extra information about the
result of a text search.
[ChangeLog][QtWebEngineWidgets][QWebEnginePage] Introduces
findTextFinished signal and QWebEngineFindTextResult class to provide
extra information about the result of a text search.
Task-number: QTBUG-50420
Change-Id: Icb9737d2f596e6bc0fc5733144eeeaf2a77aab02
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/webengine/plugin/plugin.cpp')
-rw-r--r-- | src/webengine/plugin/plugin.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/webengine/plugin/plugin.cpp b/src/webengine/plugin/plugin.cpp index ad49d6543..e47a46a95 100644 --- a/src/webengine/plugin/plugin.cpp +++ b/src/webengine/plugin/plugin.cpp @@ -55,6 +55,7 @@ #include <QtWebEngine/private/qquickwebenginetouchhandleprovider_p_p.h> #include <QtWebEngine/private/qquickwebengineview_p.h> #include <QtWebEngine/private/qquickwebengineaction_p.h> +#include <QtWebEngineCore/qwebenginefindtextresult.h> #include <QtWebEngineCore/qwebenginenotification.h> #include <QtWebEngineCore/qwebenginequotarequest.h> #include <QtWebEngineCore/qwebengineregisterprotocolhandlerrequest.h> @@ -170,6 +171,8 @@ public: qmlRegisterUncreatableType<QWebEngineNotification>(uri, 1, 9, "WebEngineNotification", msgUncreatableType("WebEngineNotification")); qmlRegisterUncreatableType<QQuickWebEngineTooltipRequest>(uri, 1, 10, "TooltipRequest", msgUncreatableType("TooltipRequest")); + qRegisterMetaType<QWebEngineFindTextResult>(); + qmlRegisterUncreatableType<QWebEngineFindTextResult>(uri, 1, 11, "FindTextResult", msgUncreatableType("FindTextResult")); } private: |