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

QML warning may leak user input

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS

    Description

      The commit 80bbaf6fad7376a94bc460eb6e98031bb5266ce1 introduced a QML warning if the "application wide" focus object differs from the "input context" one:

      stale focus object 0x302bf2920 , doing manual update
      

      While this leads to correct behavior, it might leak the user input to the log console.

      Consider the attached MWE, clicking the buttons gives the following log output (excerpt):

      stale focus object 0x302bf3020 , doing manual update
      Button 6 clicked
      stale focus object 0x302bf2920 , doing manual update
      Button 7 clicked
      Button 7 clicked
      stale focus object 0x302bf2ca0 , doing manual update
      

      This might give conclusions to what the user entered if access to the console/logfile is given. Is there a "cleaner" way to ensure the correct situation handling as introduced by the commit stated above without having the QML warning? Is there anything "off" in the background of focus handling?

      Note: I've marked this to affect Qt 6.8.1 as this is the version I used in the MWE, as the commit is quite old, the issue propably affects all versions starting with Qt 5.9.

      Attachments

        1. CMakeLists.txt
          1 kB
        2. Main.qml
          0.4 kB
        3. main.cpp
          0.4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vestbo Tor Arne Vestbø
            janmoeller Jan Möller
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes