Changeset View
Changeset View
Standalone View
Standalone View
src/spellcheck/spellcheck.cpp
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | 48 | { | |||
---|---|---|---|---|---|
51 | return speller.suggest(word); | 51 | return speller.suggest(word); | ||
52 | } | 52 | } | ||
53 | 53 | | |||
54 | void KateSpellCheckManager::ignoreWord(const QString &word, const QString &dictionary) | 54 | void KateSpellCheckManager::ignoreWord(const QString &word, const QString &dictionary) | ||
55 | { | 55 | { | ||
56 | Sonnet::Speller speller; | 56 | Sonnet::Speller speller; | ||
57 | speller.setLanguage(dictionary); | 57 | speller.setLanguage(dictionary); | ||
58 | speller.addToSession(word); | 58 | speller.addToSession(word); | ||
59 | emit wordIgnored(word); | ||||
59 | } | 60 | } | ||
60 | 61 | | |||
61 | void KateSpellCheckManager::addToDictionary(const QString &word, const QString &dictionary) | 62 | void KateSpellCheckManager::addToDictionary(const QString &word, const QString &dictionary) | ||
62 | { | 63 | { | ||
63 | Sonnet::Speller speller; | 64 | Sonnet::Speller speller; | ||
64 | speller.setLanguage(dictionary); | 65 | speller.setLanguage(dictionary); | ||
65 | speller.addToPersonal(word); | 66 | speller.addToPersonal(word); | ||
67 | emit wordAddedToDictionary(word); | ||||
66 | } | 68 | } | ||
67 | 69 | | |||
68 | QList<KTextEditor::Range> KateSpellCheckManager::rangeDifference(const KTextEditor::Range &r1, | 70 | QList<KTextEditor::Range> KateSpellCheckManager::rangeDifference(const KTextEditor::Range &r1, | ||
69 | const KTextEditor::Range &r2) | 71 | const KTextEditor::Range &r2) | ||
70 | { | 72 | { | ||
71 | Q_ASSERT(r1.contains(r2)); | 73 | Q_ASSERT(r1.contains(r2)); | ||
72 | QList<KTextEditor::Range> toReturn; | 74 | QList<KTextEditor::Range> toReturn; | ||
73 | KTextEditor::Range before(r1.start(), r2.start()); | 75 | KTextEditor::Range before(r1.start(), r2.start()); | ||
▲ Show 20 Lines • Show All 214 Lines • Show Last 20 Lines |