diff --git a/src/composer-ng/richtextcomposercontroler.cpp b/src/composer-ng/richtextcomposercontroler.cpp --- a/src/composer-ng/richtextcomposercontroler.cpp +++ b/src/composer-ng/richtextcomposercontroler.cpp @@ -659,8 +659,6 @@ void RichTextComposerControler::ensureCursorVisible() { - QCoreApplication::processEvents(); - // Hack: In KMail, the layout of the composer changes again after // creating the editor (the toolbar/menubar creation is delayed), so // the size of the editor changes as well, possibly hiding the cursor diff --git a/src/texteditor/richtexteditor/richtexteditor.cpp b/src/texteditor/richtexteditor/richtexteditor.cpp --- a/src/texteditor/richtexteditor/richtexteditor.cpp +++ b/src/texteditor/richtexteditor/richtexteditor.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -650,7 +651,9 @@ { if (highlighter()) { highlighter()->setCurrentLanguage(_language); +#if SONNET_VERSION < QT_VERSION_CHECK(5, 49, 0) highlighter()->rehighlight(); +#endif } if (_language != d->spellCheckingLanguage) {