diff options
author | Kirill Burtsev <kirill.burtsev@qt.io> | 2019-07-15 13:03:14 +0200 |
---|---|---|
committer | Kirill Burtsev <kirill.burtsev@qt.io> | 2019-07-16 22:47:33 +0200 |
commit | b4589db4c7cb10cb55b38bab00d80eb1290312b1 (patch) | |
tree | 9c733e9052a946ef90ffc8fa7cff6d86d6d87c36 /src/core/web_contents_adapter.cpp | |
parent | 73daf5b669c943d3c7a765533c5b5d61c380a576 (diff) |
Reset findText reply id on StopFinding to prevent callback later
Not updating lastReceivedFindReply caused next findText call after
StopFinding to trigger redundant callback call on checking stale query.
Fixes: QTBUG-77029
Change-Id: Iad4b71364ecb3ec3db3096b739e77620d12731f9
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r-- | src/core/web_contents_adapter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 567a76637..a342ba302 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -987,6 +987,7 @@ quint64 WebContentsAdapter::findText(const QString &subString, bool caseSensitiv // waiting for it forever. // Assume that any unfinished find has been unsuccessful when a new one is started // to cover that case. + m_webContentsDelegate->setLastReceivedFindReply(m_lastFindRequestId); m_adapterClient->didFindText(m_lastFindRequestId, 0); } @@ -1007,6 +1008,7 @@ quint64 WebContentsAdapter::findText(const QString &subString, bool caseSensitiv void WebContentsAdapter::stopFinding() { CHECK_INITIALIZED(); + m_webContentsDelegate->setLastReceivedFindReply(m_lastFindRequestId); m_webContentsDelegate->setLastSearchedString(QString()); m_webContents->StopFinding(content::STOP_FIND_ACTION_KEEP_SELECTION); } |