diff options
Diffstat (limited to 'src/gui/inputmethod/qcoefepinputcontext_s60.cpp')
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index af86d77..4a1b9b9 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -238,8 +238,10 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event) } QString widgetText = focusWidget()->inputMethodQuery(Qt::ImSurroundingText).toString(); - int maxLength = focusWidget()->inputMethodQuery(Qt::ImMaximumTextLength).toInt(); - if (!keyEvent->text().isEmpty() && widgetText.size() + m_preeditString.size() >= maxLength) { + bool validLength; + int maxLength = focusWidget()->inputMethodQuery(Qt::ImMaximumTextLength).toInt(&validLength); + if (!keyEvent->text().isEmpty() && validLength + && widgetText.size() + m_preeditString.size() >= maxLength) { // Don't send key events with string content if the widget is "full". return true; } |