-
Notifications
You must be signed in to change notification settings - Fork 117
Conversation
- use spellchecking in inputtextwidget and provide a suggestion list
stream/master' # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
Could you add the hunspell library to the .travis.yml file so that Travis-CI could build the PR? |
#include <QString> | ||
#include <QStringList> | ||
#include <QStringListIterator> | ||
#include <QRegExp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with hunspell on Windows. It works, but requires some improvements. For example:
I think it's a bit fresh for merging into the master as, how you name it "first version". Making suggestion show at the top of the context menu popup in reverse order of what it is now, allowing to right-click on a word where we don't have the I-beam cursor blinking (well, that one actually can be added later) and adapting the code from the link mentioned in #100 (comment) instead of writing own from the bottom up should make it merge-able. |
@nurupo :( What's wrong with my PRs? |
Of course I will continue working on this ticket. The reason that i didn't replay your comments were simply that I visited a friend over the weekend. Could you send me, or simply add a pull request for the windows lib of hunspell? I will fix the suggestions list asap (maybe today). I also could add some dictionaries for common language to the repository. |
[...] Could you add the hunspell library to the .travis.yml file so that Travis-CI could build the PR? [...] I'm not familiar with Travis-Cl. Do i have to simply wget the package and add the include path? |
@ReTuXx You just do what you would've done using bash.
|
Check if the libhunspell is in the right PATH |
Installing hunspell from apt should be the easiest way :) |
That's a bit nasty -- creating a branch to send you a PR that will be added to the PR you are making to me that will end up back in one of my branches. Anyway, here it is a small patch https://github.com/retuxx/ProjectTox-Qt-GUI/pull/1, read the comment on it. |
I finished the spell checker. As far as I can see I fixed all your announcements. Nevertheless a dialog for setting up the preferred language is missing |
Thanks : )
Could you explain how it depends on the new message display? |
I misread the the topic of this PR and thought it contains a new settings dialog |
This is a first version of spell checking (only works on linux and maybe mac, since i have no windows machine available to compile hunspell as static lib). It also provides the feature to replace a misspelled word with a suggested word. The spell checking itself can be used on any QTextDocument.
I had some trouble to add a dictionary to the rcc file therefore i used a static path to "/usr/share/hunspell/en_US.aff" and "/usr/share/hunspell/en_US.dic". Furthermore I am not sure whether we should bundle some dictionaries or use the system one. The second option causes some extra work for windows clients, so I would recommend to bundle the common languages