brauch added a comment.
I would also advise against calling processEvents() to keep UIs responsive in all cases. It's tempting, but it is near impossible to get it right. What about conflicting actions, close/resize events, dbus calls, etc etc that are handled here? I think the right way to implement this would be something like, copy the required data, run the expensive S&R with QtConcurrent, and replace it back into the UI when done. REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D17459 To: loh.tar, #ktexteditor, #vdg, cullmann Cc: brauch, cullmann, abetts, kwrite-devel, kde-frameworks-devel, #ktexteditor, hase, michaelh, ngraham, bruns, demsking, sars, dhaumann