Open cltseng0420 opened 8 years ago
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?
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
oh... I found "ui_UserphraseDialog.h" is generated by "UserphraseDialog.ui"....
MAX_PHRASE_LEN
is inside libchewing
, it depends on the package on your system
I found that
MAX_PHRASE_LEN
in 'libchewing/include/internal/chewing-private.h' is
#define MAX_PHRASE_LEN 11
Sometimes if you type a word, for example, "王王王王王王王王王王王王王(13 characters)", it cannot add to the chewing editor.