summaryrefslogtreecommitdiffstats
path: root/src/core/find_text_helper.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-07-09 16:48:00 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-07-14 19:02:59 +0000
commit58c67b08f7ad668f95a6edaccd96dd0fe72f675d (patch)
tree7c8744208ba57eb220ae582a3c2f927b27a7e854 /src/core/find_text_helper.h
parentf1d76a9d05e34686414ef7f2f214a64f35a2e8fa (diff)
Update parameters to findText callback
Change-Id: I622ff55c1c9b6f9d4818228c75543c3deffa37be Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> (cherry picked from commit 56b1f53d9b2927f5ba2a73f85cee59e385bf489d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/core/find_text_helper.h')
-rw-r--r--src/core/find_text_helper.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/find_text_helper.h b/src/core/find_text_helper.h
index 394ea5bb0..cdea3c2f8 100644
--- a/src/core/find_text_helper.h
+++ b/src/core/find_text_helper.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtWebEngine module of the Qt Toolkit.
@@ -63,6 +63,8 @@ namespace gfx {
class Rect;
}
+QT_FORWARD_DECLARE_CLASS(QWebEngineFindTextResult)
+
namespace QtWebEngineCore {
class WebContentsAdapterClient;
@@ -72,7 +74,7 @@ public:
FindTextHelper(content::WebContents *webContents, WebContentsAdapterClient *viewClient);
~FindTextHelper();
- void startFinding(const QString &findText, bool caseSensitively, bool findBackward, const std::function<void(bool)> &resultCallback);
+ void startFinding(const QString &findText, bool caseSensitively, bool findBackward, const std::function<void(const QWebEngineFindTextResult &)> &resultCallback);
void startFinding(const QString &findText, bool caseSensitively, bool findBackward, const QJSValue &resultCallback);
void startFinding(const QString &findText, bool caseSensitively, bool findBackward);
void stopFinding();
@@ -81,7 +83,7 @@ public:
void handleLoadCommitted();
private:
- void invokeResultCallback(int requestId, int numberOfMatches);
+ void invokeResultCallback(int requestId, int numberOfMatches, int activeMatch);
content::WebContents *m_webContents;
WebContentsAdapterClient *m_viewClient;
@@ -93,7 +95,7 @@ private:
QString m_previousFindText;
QMap<int, QJSValue> m_quickCallbacks;
- QMap<int, std::function<void(bool)>> m_widgetCallbacks;
+ QMap<int, std::function<void(const QWebEngineFindTextResult &)>> m_widgetCallbacks;
};
} // namespace QtWebEngineCore