summaryrefslogtreecommitdiffstats
path: root/src/core/find_text_helper.h
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2019-07-12 13:39:06 +0200
committerPeter Varga <pvarga@inf.u-szeged.hu>2019-08-23 10:25:23 +0200
commita6abc01319798e2175914323273e91927516eba0 (patch)
treec7fe231f43e80cc4442c535442f41de1cd521fda /src/core/find_text_helper.h
parent55a4c28542c6dc9e4a4edc0aab7043feef2ab0d2 (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/core/find_text_helper.h')
-rw-r--r--src/core/find_text_helper.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/find_text_helper.h b/src/core/find_text_helper.h
index 17e76ecc7..e8f186272 100644
--- a/src/core/find_text_helper.h
+++ b/src/core/find_text_helper.h
@@ -66,9 +66,11 @@ class Rect;
namespace QtWebEngineCore {
+class WebContentsAdapterClient;
+
class Q_WEBENGINECORE_PRIVATE_EXPORT FindTextHelper {
public:
- FindTextHelper(content::WebContents *webContents);
+ FindTextHelper(content::WebContents *webContents, WebContentsAdapterClient *viewClient);
~FindTextHelper();
void startFinding(const QString &findText, bool caseSensitively, bool findBackward, const QWebEngineCallback<bool> resultCallback);
@@ -83,6 +85,7 @@ private:
void invokeResultCallback(int requestId, int numberOfMatches);
content::WebContents *m_webContents;
+ WebContentsAdapterClient *m_viewClient;
static int m_findRequestIdCounter;
int m_currentFindRequestId;