kdecore: fix build with Enchant v2.0 or newer and require v1.4 as miminum

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2017-12-11 11:51:36 +00:00
parent 61333c4671
commit 8624d51432
2 changed files with 2 additions and 3 deletions

View file

@ -66,7 +66,7 @@ set_package_properties(SharedMimeInfo PROPERTIES
PURPOSE "Allows KDE applications to determine file types" PURPOSE "Allows KDE applications to determine file types"
) )
find_package(ENCHANT) find_package(ENCHANT 1.4.0)
set_package_properties(ENCHANT PROPERTIES set_package_properties(ENCHANT PROPERTIES
DESCRIPTION "Generic spell checking library" DESCRIPTION "Generic spell checking library"
URL "http://www.abisource.com/projects/enchant/" URL "http://www.abisource.com/projects/enchant/"

View file

@ -89,8 +89,7 @@ bool QSpellEnchantDict::storeReplacement(const QString &bad,
bool QSpellEnchantDict::addToPersonal(const QString &word) bool QSpellEnchantDict::addToPersonal(const QString &word)
{ {
enchant_dict_add_to_pwl(m_dict, word.toUtf8(), enchant_dict_add(m_dict, word.toUtf8(), word.toUtf8().length());
word.toUtf8().length());
return true; return true;
} }