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

QInputMethodEvent with an empty commitString

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.11.0
    • None

    Description

      In QQuickTextInputPrivate::processInputMethodEvent you find the following sequence:

      bool isGettingInput = !event->commitString().isEmpty()

      event->preeditString() != preeditAreaText()
      event->replacementLength() > 0;

       

      So in case of having an empty commitString ( what is valid input ) the event is interpreted as not changing the text. The correct code should be to compare the commitString() with the existing text.

       

      A possible workaround is to send an event with a replacementLength of 1, what  is wrong, but gets fixed later by some defensive checks.

       

      Actually the bug was found with Qt 5.9, but as the code has not changed since then it should be present in 5.11 as well.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            uwe Uwe Rathmann
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes