RichtextEditor: don't rehighlight() directly, once is enough.
ClosedPublic

Authored by dfaure on Jul 28 2018, 10:45 PM.

Details

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.

Diff Detail

Repository
R86 PIM: Text Editor
Branch
Applications/18.04
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 1317
Build 1335: arc lint + arc unit
dfaure created this revision.Jul 28 2018, 10:45 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptJul 28 2018, 10:45 PM
Restricted Application edited subscribers, added: kde-pim; removed: KDE PIM. · View Herald Transcript
dfaure requested review of this revision.Jul 28 2018, 10:45 PM
mlaurent accepted this revision.Jul 29 2018, 10:49 AM
This revision is now accepted and ready to land.Jul 29 2018, 10:49 AM
dfaure closed this revision.Jul 29 2018, 12:34 PM