RichtextEditor: don't rehighlight() directly, once is enough.
Summary: With the sonnet fix https://phabricator.kde.org/D14447, setLanguage takes care of scheduling a call to rehighlight (via a timer which is already started in the constructor anyway), so that we don't have to call it directly here, leading to two calls. The hackish processEvents() has to be removed too, since otherwise it would process the ctor timer and rehighlight before the call to setLanguage even happens. I think the 500ms timer below that processEvents() call means that we don't need it anyway. Test Plan: Replying to a mail in kmail, and checking how many times slotRehighlight is called. With and without autodetection of language. Reviewers: sandsmark, mlaurent Reviewed By: mlaurent Subscribers: kde-pim Tags: #kde_pim Differential Revision: https://phabricator.kde.org/D14448
parent
3d58f762
Please register or sign in to comment