freebsd-ports/net-im/psi/files/patch-src_libpsi_tools_spellchecker_spellchecker.cpp
Alexey Dokuchaev 59494c0dce - Update `net-im/psi' to version 1.4
- Replace current 2015 Hunspell implementation (by Sergey Ilinykh and
  Vitaly Tonkacheyev) with 2009 one by Alexander Tsvyashchenko, which
  turned out to be better alternative:

   * Much faster (suggestions appear almost instantly vs. several
     hundreds milliseconds with the original implementation)
   * Better multilanguage support (tested with English and Russian)
   * Ability to limit number of suggestions in the settings dialog
   * Working "add word to the dictionary" feature

Obtained from:	http://endl.ch/content/psi-spell-checking-hunspell-support
2019-04-07 14:45:50 +00:00

37 lines
996 B
C++

--- src/libpsi/tools/spellchecker/spellchecker.cpp.orig 2018-11-02 00:37:04 UTC
+++ src/libpsi/tools/spellchecker/spellchecker.cpp
@@ -48,7 +48,7 @@ SpellChecker* SpellChecker::instance()
#elif defined(HAVE_ASPELL)
instance_ = new ASpellChecker();
#elif defined(HAVE_HUNSPELL)
- instance_ = new HunspellChecker();
+ instance_ = new HunSpellChecker();
#else
instance_ = new SpellChecker();
#endif
@@ -80,14 +80,23 @@ bool SpellChecker::isCorrect(const QString&)
return true;
}
-QList<QString> SpellChecker::suggestions(const QString&)
+QList<QString> SpellChecker::suggestions(const QString&, const QString&, unsigned)
{
return QList<QString>();
}
-bool SpellChecker::add(const QString&)
+bool SpellChecker::add(const QString&, const QString&)
{
return false;
+}
+
+QList<QString> SpellChecker::getAllLanguages() const
+{
+ return QList<QString>();
+}
+
+void SpellChecker::setActiveLanguages(const QList<QString>&)
+{
}
SpellChecker* SpellChecker::instance_ = NULL;