diff --git a/src/gui/platform/unix/qxkbcommon.cpp b/src/gui/platform/unix/qxkbcommon.cpp index b1ec320b878..9072030b958 100644 --- a/src/gui/platform/unix/qxkbcommon.cpp +++ b/src/gui/platform/unix/qxkbcommon.cpp @@ -41,7 +41,9 @@ #include +#include #include + #include #include @@ -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); } }