diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-05-09 12:04:12 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-06-09 18:58:54 +0200 |
commit | 5d1ef38f9f6815807596d0606cf7ed06b7930aac (patch) | |
tree | 441c2b27eb9d169d58cb94a30ac424ebb6b42b65 /tests/auto/widgets/spellchecking/tst_spellchecking.cpp | |
parent | 3f5b5213d42376470274f0e3aaa51731f0d2552a (diff) |
Create a RWHV delegate in core
This is adapting the Quick code for shared use with widgets,
and allows us to use it from QWebEnginePage.
Pick-to: 6.4
Fixes: QTBUG-96377
Change-Id: I3f09c1a949eff86d80fbe6c513dc66e3f9f2f611
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'tests/auto/widgets/spellchecking/tst_spellchecking.cpp')
-rw-r--r-- | tests/auto/widgets/spellchecking/tst_spellchecking.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/widgets/spellchecking/tst_spellchecking.cpp b/tests/auto/widgets/spellchecking/tst_spellchecking.cpp index 7263904ce..738010ac8 100644 --- a/tests/auto/widgets/spellchecking/tst_spellchecking.cpp +++ b/tests/auto/widgets/spellchecking/tst_spellchecking.cpp @@ -170,6 +170,7 @@ void tst_Spellchecking::spellcheck() QVariantList list = evaluateJavaScriptSync(m_view->page(), "findWordPosition('I lowe Qt ....','lowe');").toList(); QRect rect(list[0].value<int>(),list[1].value<int>(),list[2].value<int>(),list[3].value<int>()); + QTRY_VERIFY(m_view->focusWidget()); //type text, spellchecker needs time QTest::mouseMove(m_view->focusWidget(), QPoint(20,20)); QTest::mousePress(m_view->focusWidget(), Qt::LeftButton, {}, QPoint(20,20)); @@ -182,7 +183,7 @@ void tst_Spellchecking::spellcheck() // make sure text is there QString result = evaluateJavaScriptSync(m_view->page(), "text();").toString(); - QVERIFY(result == text); + QCOMPARE(result, text); bool gotMisspelledWord = false; // clumsy QTRY_VERIFY still execs expr after first success QString detail; |