Use selected text in searchToolBar
ClosedPublic

Authored by progwolff on Mar 10 2018, 1:44 PM.

Details

Summary

With this patch, the currently selected text in a webpage is automatically inserted into the
searchToolBar when it is opened.
This matches the behaviour of the search tool bar in Kate.

Test Plan

Open a webpage. Select a single line of text. Press Ctrl+F. The selected text is inserted into the
searchToolBar.

Diff Detail

Repository
R875 Falkon
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
progwolff requested review of this revision.Mar 10 2018, 1:44 PM
progwolff created this revision.
drosca requested changes to this revision.Mar 10 2018, 1:49 PM
drosca added a subscriber: drosca.
drosca added inline comments.
src/lib/app/browserwindow.cpp
1157

There is QWebEnginePage::selectedText().

This revision now requires changes to proceed.Mar 10 2018, 1:49 PM
progwolff updated this revision to Diff 29157.Mar 10 2018, 1:54 PM
  • Use QWebEnginePage::selectedText()
progwolff marked an inline comment as done.Mar 10 2018, 2:00 PM
drosca accepted this revision.Mar 10 2018, 2:01 PM

Apart from those minor issues, looks good. Thanks.

src/lib/app/browserwindow.cpp
1157

page() will never be null.

1158

const

1162

else on the same line } else {

This revision is now accepted and ready to land.Mar 10 2018, 2:01 PM
progwolff updated this revision to Diff 29158.Mar 10 2018, 2:02 PM
  • remove unnecessary semicolon
progwolff updated this revision to Diff 29159.Mar 10 2018, 2:04 PM
progwolff marked 3 inline comments as done.
  • remove nullptr check, use const QString, style
This revision was automatically updated to reflect the committed changes.