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

Introduce a QInputContext::reset() variant which encourages committing current preedit

    XMLWordPrintable

Details

    Description

      QInputContext::reset() now sort of forbids sending input method events back with commit text, although we got confirmation that it is ok after all and even Qt input method plugins do that. Would be nice if there would be a bit different mechanism were input context is encouraged to commit what was being written.

      Use cases there would be losing focus or repositioning the cursor etc. while having preedit. IC::reset() should of course be called also on those occasions, but it would be quite bad if QIC would send an empty QInputMethodEvent. That would remove one word from the contents. On MTextEdit of meegotouch we actually commit the word first ourselves to avoid this (and omit following input method event), but QLineEdit and QTextEdit do not do anything. If we wouldn't commit preedit on our reset() implementation, they would still have it after focus is removed.

      One problem with the above is that IMO it should really be the input context that decides what gets committed. There's really no guarantee at all that commit string would resemble earlier preedit at all, like e.g. with chinese input.

      Attachments

        Issue Links

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

          Activity

            People

              hhartz Henrik Hartz (closed Nokia identity) (Inactive)
              pvuorela Pekka Vuorela
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes