D17459: SearchBar: Add Cancel button to stop long running tasks

loh tar noreply at phabricator.kde.org
Mon Dec 10 17:15:50 GMT 2018


loh.tar added a comment.


  Hmpf! Some googling didn't help. Just some thoughts.
  
  - Adding a couple of checks where ever just to block in case of a running S&R could be a little cumbersome
  - What we need would be an QObject::processEvents, so that only the Cancle button is a live but no other stuff
  - Can we install an eventFilter and ignore all except our Cancel button?
  - QCoreApplication::processEvents take an optional argument e.g. QEventLoop::ExcludeUserInputEvents, nice but didn't help
  
  I have tried the S&R plugin with the fat file. That's smart enough to see that the task is too heavy and stopped after a couple of hits when searching. The Cancel button there (almost) didn't appear in this use case when invoke the "replace all" action. Obviously is it only updated between file changes or so. Hence, we can not profit from his functionality.

REPOSITORY
  R39 KTextEditor

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

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


More information about the KWrite-Devel mailing list