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

QTouchEvent::TouchPoint documentation is wrong regarding ::id()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • 4.8.x
    • 4.7.0
    • Documentation
    • None

    Description

      From the docs:

      "int TouchPoint::id () const
      Returns the id number of this touch point.

      Id numbers are globally sequential, starting at zero, meaning the first touch point in the application has id 0, the second has id 1, and so on."

      This is plain wrong, and it gives the idea that a user could store the id's somehow. But there is no global sequence.

      Instead, what ::id() returns is an id to the currently active touch points, ie., the position in QTouchEvent::touchPoints().
      It is better to state that an id stays valid from touch event begin to touch event end, (but only if those events are received on the same active touch point). After a touch event transaction ends, Qt starts to reuse the id's. With other words: all id's get invalidated after an active touchpoint enters its TouchPointReleased state.

      Attachments

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

        Activity

          People

            jerome.pasion Jerome Pasion
            mikhas Michael Hasselmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes