Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typing a long word #74

Open
cltseng0420 opened this issue Mar 16, 2016 · 5 comments
Open

Typing a long word #74

cltseng0420 opened this issue Mar 16, 2016 · 5 comments
Labels

Comments

@cltseng0420
Copy link

Sometimes if you type a word, for example, "王王王王王王王王王王王王王(13 characters)", it cannot add to the chewing editor.

@david50407
Copy link
Member

Debug console will output like this:

Warning: [userphrase-sql.c:213 UserUpdatePhrase] wordSeq length > 20 MAX_PHRASE_LEN (11) ((null) :0)

Maybe we can show a error dialog telling the word user typed-in is too long, or showing the limitation while adding phrases?

@czchen czchen added the feature label Mar 22, 2016
@ShengYenPeng
Copy link

we can add
phrase->setMaxLength(11);
in void setupUi(QDialog *UserphraseDialog), which is inside "ui_UserphraseDialog.h"

so that the phrase will be truncated into limited size, you can't input more than 11 characters.

*use MAX_PHRASE_LEN is better than 11, but I don't know where is MAX_PHRASE_LEN.

ref: maxLength : int

@ShengYenPeng
Copy link

oh... I found "ui_UserphraseDialog.h" is generated by "UserphraseDialog.ui"....

@david50407
Copy link
Member

MAX_PHRASE_LEN is inside libchewing, it depends on the package on your system

@ShengYenPeng
Copy link

I found that

MAX_PHRASE_LEN in 'libchewing/include/internal/chewing-private.h' is

#define MAX_PHRASE_LEN 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants