Review Request 127033: Add <app dir>/../share/hunspell/ to dictionary search path
David Faure
faure at kde.org
Sun Feb 21 17:45:02 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127033/#review92618
-----------------------------------------------------------
src/plugins/hunspell/hunspelldict.cpp (line 40)
<https://git.reviewboard.kde.org/r/127033/#comment63137>
The QLatin1String here looks wrong, this should be QFile::decodeName().
src/plugins/hunspell/hunspelldict.cpp (line 42)
<https://git.reviewboard.kde.org/r/127033/#comment63139>
if (!QFileInfo::exists(dic)) is faster
src/plugins/hunspell/hunspelldict.cpp (line 44)
<https://git.reviewboard.kde.org/r/127033/#comment63138>
And then this could be the same as line 40, both would then be:
dic = QFile::decodeName(dirPath) + lang + QStringLiteral(".dic");
src/plugins/hunspell/hunspelldict.cpp (line 55)
<https://git.reviewboard.kde.org/r/127033/#comment63140>
I've seen this before.... maybe it should be a function ;)
- David Faure
On Feb. 10, 2016, 6:45 p.m., Kåre Särs wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127033/
> -----------------------------------------------------------
>
> (Updated Feb. 10, 2016, 6:45 p.m.)
>
>
> Review request for KDE Frameworks, Laurent Montel and Martin Tobias Holmedahl Sandsmark.
>
>
> Repository: sonnet
>
>
> Description
> -------
>
> The default search path for hunspell dictionaries is /usr/share/hunspell/, but that is not a very common directory on windows ;)
>
> For Windows and Mac there are some extra search paths defined in side #ifdefs, but they are hardcoded to the LibreOffice dictionary directories. Unfortunately the extra Windows path points to a 32bit LibreOffice 5 on a 64 bit Windows directory. This patch adds <app dir>/../share/hunspell/ to the search path in case the default is not found.
>
> If wanted I can add a CMake define for specifying the path relative to the application directory.
>
>
> Diffs
> -----
>
> src/core/guesslanguage.cpp e8deb90
> src/plugins/hunspell/hunspellclient.cpp 3da7219
> src/plugins/hunspell/hunspelldict.cpp bc5c314
>
> Diff: https://git.reviewboard.kde.org/r/127033/diff/
>
>
> Testing
> -------
>
> Compiled Sonnet and Kate on Windows and got spelling to work :)
>
> It is now possible to add dictionaries to a relocatable <App dir>/../share/hunspell/ and get spelling to work without depending on LibreOffice installation on Windows.
>
>
> Thanks,
>
> Kåre Särs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160221/e15dbaa9/attachment.html>
More information about the Kde-frameworks-devel
mailing list