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

asciiToKey does not handle \n and \x7F (delete)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.11.2, 5.12.0 Beta 3
    • Fix Version/s: None
    • Component/s: Testing: qtestlib
    • Labels:
      None

      Description

      QTest::asciiToKey(char ascii) does not have an entry for 0x0A (\n) and \x7F (delete).

       

      We were using QTest::keyClick(widget, char) to simulate user inputs, but have manually added exceptions for these two characters to map to \r and to call QTest:keyClick(widget, QKey) with Qt::Key_Delete instead, respectively. If asciiToKey supported these two characters, that workaround wouldn't be necessary.

       

      Similarly, keyToAscii (explicitly!) maps Key_Delete to 0, not to \x7F.

       

       

        Attachments

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

          Activity

            People

            Assignee:
            macadder Jason McDonald
            Reporter:
            karyon karyon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes