Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
4.8.6, 5.4.0, 5.4.1
-
None
-
Tested on Win7
Description
The conversion QKeySequence -> native String -> QKeySequence does not
work propertly for arrow keys with Japanese Translation. The second QKeySequence does not match the first one. Additionally, it is not possible to recover the PortableText from the resulting QKeySequence (instead it returns the native text).
This bug is related to the fact that the arrow keys (e.g. "Left") are translated to unicode arrows in the japanese translation.
example
QString portableKey = "Left"; QKeySequence::fromString(portableKey); QString nativeKey = portableSeq.toString(QKeySequence::NativeText); // is a uncode Left arrow (ok so far) QKeySequence nativeSeq = QKeySequence::fromString(nativeKey, QKeySequence::NativeText); nativeSeq.matches(portableSeq)); // returns 0(NoMatch), expected 2(ExactMatch) portableSeq.toString(QKeySequence::PortableText); // returns "Left" (ok) nativeSeq.toString(QKeySequence::PortableText); // returns the unicode arrow, expected: "Left"
The attachment contains a MWE project showing the bug (possibly you need to adapt the path to the translation file).