Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-8807

QLineControl::updateDisplayText() doesn't check the existence of preedit text when updating the area

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.6.3
    • 4.6.0, 4.6.1, 4.6.2
    • None
    • 9b4ca998930c7b81b72e5068b3ebae33907ac4b2

    Description

      QLineControl::updateDisplayText() doesn't check the existence of preedit text when updating the area. This results in inputting into QLineEdit through IMEs such as uim or scim being sluggish and unresponsive. Qt 4.6 series was the first time I noticed this bug.

      A patch by Etsushi Kato <ek.kato@gmail.com> for qt 4.6.2 is proposed:

      — qt-kde-qt-mac/src/gui/widgets/qlinecontrol.cpp.orig 2010-02-17
      12:18:04.000000000 +0900
      +++ qt-kde-qt-mac/src/gui/widgets/qlinecontrol.cpp 2010-03-06
      23:35:54.000000000 +0900
      @@ -406,8 +406,9 @@
      void QLineControl::processInputMethodEvent(QInputMethodEvent *event)

      { int priorState = 0; + QString oldPreeditText = preeditAreaText(); bool isGettingInput = !event->commitString().isEmpty() - || event->preeditString() != preeditAreaText() + || event->preeditString() != oldPreeditText || event->replacementLength() > 0; bool cursorPositionChanged = false; @@ -477,6 +478,8 @@ }

      m_textLayout.setAdditionalFormats(formats);
      updateDisplayText();
      + if (preeditAreaText() != oldPreeditText)
      + emit displayTextChanged(preeditAreaText());
      if (cursorPositionChanged)
      emitCursorPositionChanged();
      if (isGettingInput)

      This bug was originally reported by me to the libuim bugtracker, where Etsushi Kato was nice enough to track down the issue and write a patch.
      For the original bug report see here: http://bugs.freedesktop.org/show_bug.cgi?id=26265

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            griebl Robert Griebl (closed Nokia identity) (Inactive)
            metellius Harald Hvaal
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes