qxkbcommon: UCS-4-encode surrogate characters in QKeyEvent::key()
Fixes: QTBUG-72776 Pick-to: 6.2 5.15 Done-with: Liang Qi <liang.qi@qt.io> Change-Id: I9d1f4e34527079c3bc460016fe9b953636b4d6cb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
parent
5bacfbd77e
commit
9ef69efb3b
@ -41,7 +41,9 @@
|
||||
|
||||
#include <private/qmakearray_p.h>
|
||||
|
||||
#include <QtCore/private/qstringiterator_p.h>
|
||||
#include <QtCore/QMetaMethod>
|
||||
|
||||
#include <QtGui/QKeyEvent>
|
||||
#include <QtGui/private/qguiapplication_p.h>
|
||||
|
||||
@ -588,7 +590,9 @@ static int keysymToQtKey_internal(xkb_keysym_t keysym, Qt::KeyboardModifiers mod
|
||||
// e.g CTRL + ۲ (arabic two), is mapped to CTRL + Qt::Key_2.
|
||||
qtKey = Qt::Key_0 + text.unicode()->digitValue();
|
||||
} else {
|
||||
qtKey = text.unicode()->toUpper().unicode();
|
||||
text = text.toUpper();
|
||||
QStringIterator i(text);
|
||||
qtKey = i.next(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user