D14987: hunspell: Restore build with hunspell <=v1.5.0

2018-08-22 Thread Kevin Funk
This revision was automatically updated to reflect the committed changes.
Closed by commit R246:a18b3810a18d: hunspell: Restore build with hunspell 
<=v1.5.0 (authored by kfunk).

REPOSITORY
  R246 Sonnet

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D14987?vs=40190&id=40200

REVISION DETAIL
  https://phabricator.kde.org/D14987

AFFECTED FILES
  src/plugins/hunspell/CMakeLists.txt
  src/plugins/hunspell/config-hunspell.h.cmake
  src/plugins/hunspell/hunspelldict.cpp

To: kfunk, rjvbb, dfaure, mlaurent
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D14987: hunspell: Restore build with hunspell <=v1.5.0

2018-08-22 Thread Kevin Funk
kfunk added inline comments.

INLINE COMMENTS

> dfaure wrote in hunspelldict.cpp:130
> lst.reserve(nbWord);

Note: That's just old/copied code. Unlikely to be called on recent distros 
anyway.

REPOSITORY
  R246 Sonnet

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D14987

To: kfunk, rjvbb, dfaure, mlaurent
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D14987: hunspell: Restore build with hunspell <=v1.5.0

2018-08-22 Thread David Faure
dfaure accepted this revision.
dfaure added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> hunspelldict.cpp:130
> +int nbWord = m_speller->suggest(&selection, 
> toDictEncoding(word).constData());
> +for (int i = 0; i < nbWord; ++i) {
> +lst << m_codec->toUnicode(selection[i]);

lst.reserve(nbWord);

REPOSITORY
  R246 Sonnet

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D14987

To: kfunk, rjvbb, dfaure, mlaurent
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D14987: hunspell: Restore build with hunspell <=v1.5.0

2018-08-22 Thread Kevin Funk
kfunk added reviewers: rjvbb, dfaure, mlaurent.

REPOSITORY
  R246 Sonnet

REVISION DETAIL
  https://phabricator.kde.org/D14987

To: kfunk, rjvbb, dfaure, mlaurent
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D14987: hunspell: Restore build with hunspell <=v1.5.0

2018-08-22 Thread Kevin Funk
kfunk created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
kfunk requested review of this revision.

REVISION SUMMARY
  Commit 0a96acf251baa5c9dd042d093ab2bf8fcee10502 
 
broke compatibility with
  hunspell versions earlier than v1.5.1. v1.5.1 is was released Nov 2016,
  thus only two years old.
  
  This patch restores the build with hunspell versions provided on more
  conservative platforms (e.g. CentOS 6.8, which provides hunspell v1.2.x)

REPOSITORY
  R246 Sonnet

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D14987

AFFECTED FILES
  src/plugins/hunspell/CMakeLists.txt
  src/plugins/hunspell/config-hunspell.h.cmake
  src/plugins/hunspell/hunspelldict.cpp

To: kfunk
Cc: kde-frameworks-devel, michaelh, ngraham, bruns