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

David Faure noreply at phabricator.kde.org
Sat Jul 28 23:45:33 BST 2018


dfaure created this revision.
dfaure added reviewers: sandsmark, mlaurent.
Restricted Application added a project: KDE PIM.
Restricted Application edited subscribers, added: kde-pim; removed: KDE PIM.
dfaure requested review of this revision.

REVISION 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.

REPOSITORY
  R86 PIM: Text Editor

BRANCH
  Applications/18.04

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

AFFECTED FILES
  src/composer-ng/richtextcomposercontroler.cpp
  src/texteditor/richtexteditor/richtexteditor.cpp

To: dfaure, sandsmark, mlaurent
Cc: kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20180728/e95a7c08/attachment.html>


More information about the kde-pim mailing list