Libksieve

sievetexteditorspellcheckdecorator.cpp
1 /*
2  SPDX-FileCopyrightText: 2015-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-only
5 */
6 
7 #include "sievetexteditorspellcheckdecorator.h"
8 #include "sievetextedit.h"
9 using namespace KSieveUi;
10 
11 SieveTextEditorSpellCheckDecorator::SieveTextEditorSpellCheckDecorator(SieveTextEdit *plainTextEdit)
12  : Sonnet::SpellCheckDecorator(plainTextEdit)
13  , mPlainTextEdit(plainTextEdit)
14 {
15 }
16 
17 bool SieveTextEditorSpellCheckDecorator::isSpellCheckingEnabledForBlock(const QString &textBlock) const
18 {
19  // allow to spell check comment
20  return mPlainTextEdit->checkSpellingEnabled() && textBlock.startsWith(QLatin1Char('#'));
21 }
The SieveTextEdit class.
Definition: sievetextedit.h:20
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Apr 16 2021 23:09:34 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.