diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2017-01-26 10:28:41 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2017-02-06 15:59:12 +0000 |
commit | 969811105dd71e99b123534d5ca38ed93f8b9105 (patch) | |
tree | 61a412558455f6a4b277709f223f74b0d4e4112a /src | |
parent | bd18f49a9cd5f7547c34d0eb8a9dabc6a060bec8 (diff) |
Accept all formatting characters as valid input
Amends 7896ae052ad2c0c6ae2ebfc64cc2f525185198a8. The previous change
focused only on ZWJ and ZWNJ, but there are many other formatting characters
that we need to support and that may be rejected by the German keyboard-hack.
This opens up for all characters in the Other_Format category.
Task-number: QTBUG-58364
Change-Id: Ifa600c9610e38e71a71c2f668f2f9fcee5230ef3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit 8d752b5151c9890b76d50c4a479ab32dd0eca10c)
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qinputcontrol.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/text/qinputcontrol.cpp b/src/gui/text/qinputcontrol.cpp index c2c198866a..02e50e92b9 100644 --- a/src/gui/text/qinputcontrol.cpp +++ b/src/gui/text/qinputcontrol.cpp @@ -56,9 +56,9 @@ bool QInputControl::isAcceptableInput(const QKeyEvent *event) const const QChar c = text.at(0); - // ZWNJ and ZWJ. This needs to go before the next test, since CTRL+SHIFT is - // used to input it on Windows. - if (c == QChar(0x200C) || c == QChar(0x200D)) + // Formatting characters such as ZWNJ, ZWJ, RLM, etc. This needs to go before the + // next test, since CTRL+SHIFT is sometimes used to input it on Windows. + if (c.category() == QChar::Other_Format) return true; // QTBUG-35734: ignore Ctrl/Ctrl+Shift; accept only AltGr (Alt+Ctrl) on German keyboards |