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

QKeySequence::toString() problems

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.2.0
    • 4.7.2, 5.1.0
    • None
    • aec0a21f7eb5513d7c8c05e96903a66756cfc2da

    Description

      There are a number of Qt::Keys that can't nicely be represented as text using QKeySequence::toString(). Why wouldn't these keys either have a nice text representation (such as Clear) or default to the QMetaEnum::valueToKey() instead of the unicode representation from QKeySequencePrivate::encodeString

              // If we can't find the actual translatable keyname, 
              // fall back on the unicode representation of it... 
              // Or else characters like Qt::Key_aring may not get displayed 
              // (Really depends on you locale) 
              if (!keyname[i].name) { 
                  if (key < 0x10000) { 
                      p = QChar(key & 0xffff).toUpper(); 
                  } else { 
                      p = QChar((key-0x10000)/0x400+0xd800); 
                      p += QChar((key-0x10000)%400+0xdc00); 
                  } 
              }
      

      Attachments

        Issue Links

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

          Activity

            People

              mitch_curtis Mitch Curtis
              rve Anders Bakken
              Votes:
              6 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes