D17459: SearchBar: Add Cancel button to stop long running tasks
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.
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...
More information about the KWrite-Devel