Libksieve

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

KDE's Doxygen guidelines are available online.