D7672: Port to KF5::SyntaxHighlighting

Laurent Montel noreply at phabricator.kde.org
Sun Sep 3 13:15:35 BST 2017


mlaurent requested changes to this revision.
mlaurent added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> plaintextsyntaxspellcheckinghighlighter.cpp:109
>  
> -void PlainTextSyntaxSpellCheckingHighlighter::setSyntaxHighlighterRules(const QVector<KPIMTextEdit::Rule> &rule)
> +void PlainTextSyntaxSpellCheckingHighlighter::setDefinition(const KSyntaxHighlighting::Definition& def)
>  {

coding style "definition &def"

> plaintextsyntaxspellcheckinghighlighter.cpp:156
>      setMisspelledColor(d->misspelledColor);
> -    Sonnet::Highlighter::setMisspelled(start, count);
> +    for (const auto &range : d->spellCheckRanges) {
> +        if (range.offset <= start && range.end() >= start + count) {

use qAsConst(d->spellCheckRanges) to be sure

> plaintextsyntaxspellcheckinghighlighter.h:44
>  
> +    void setDefinition(const KSyntaxHighlighting::Definition& def) override;
> +

Definition &def (coding style)

REPOSITORY
  R86 PIM: Text Editor

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

To: vkrause, #kde_pim, mlaurent
Cc: mlaurent, dvasin, winterz, vkrause, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20170903/5073d262/attachment.html>


More information about the kde-pim mailing list