summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2017-01-26 10:28:41 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2017-01-26 10:59:49 +0000
commit8d752b5151c9890b76d50c4a479ab32dd0eca10c (patch)
treea152e6ad5bd2bd278110026eb7c26ca9f2668b8f /src/gui/text
parenta85ed40004e5bfe08b773737af176fbd22b529c9 (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: Idd967a9ae5b12060c851f6030b7e019508561696 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qinputcontrol.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/text/qinputcontrol.cpp b/src/gui/text/qinputcontrol.cpp
index af21ee86ee..2f7dcfcd2b 100644
--- a/src/gui/text/qinputcontrol.cpp
+++ b/src/gui/text/qinputcontrol.cpp
@@ -62,9 +62,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