D19367: [RFC]SearchBar: Don't block GUI when enter incremental pattern

loh tar noreply at phabricator.kde.org
Tue Feb 26 19:22:27 GMT 2019


loh.tar created this revision.
loh.tar added a reviewer: KTextEditor.
Herald added projects: Kate, Frameworks.
Herald added subscribers: kde-frameworks-devel, kwrite-devel.
loh.tar requested review of this revision.

REVISION SUMMARY
  When the document is very big and there is no early match while you enter the 
  search pattern the GUI hangs as long the search is running after each key 
  stroke. This patch break the document in smaller chunks to search to return fast 
  enough to the event loop to update user input.
  
  - Disable next/prev buttons when not match
  
  BUG:339337

TEST PLAN
  (No)Issues;
  
  - There may a range added where fromPos = toPos. Happens when start from first or last position of the doc. For my taste is that better than to check every time that very rare case
  
  Potential TODOs:
  
  - See code
  - Merge selectRange2 into indicateMatch
  - There is a status (KSqueezedTextLabel) set in indicateMatch, but I have never seen this hint. Tinker the UI file make it visible. Not so bad. Do anyone knows why this is still there? May that be better to use instead of the fancy in-view-hint which is sometimes annoying because it hides the text? Then Ctrl-H would only use fancy in-view-hint when no bar is visible. PowerUi would need such label too.

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D19367

AFFECTED FILES
  src/search/katesearchbar.cpp
  src/search/katesearchbar.h

To: loh.tar, #ktexteditor
Cc: kwrite-devel, kde-frameworks-devel, #ktexteditor, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190226/0bbf4dcb/attachment.html>


More information about the Kde-frameworks-devel mailing list