diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-06-24 15:14:55 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-24 15:14:55 +0200 |
commit | 88211af86c3fe447041cfa1aa7be27da86dc84af (patch) | |
tree | de1e4f9bb41432bc3dadc7ed82429fd02bf39a3c /src/plugins/platforms/xcb/qxcbkeyboard.cpp | |
parent | 687f002352a02f190591c10fded61b2e566f521e (diff) | |
parent | 6213b8145772d3dc584907a544f6c46b8cef74e2 (diff) |
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbkeyboard.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbkeyboard.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp index 155b327315..f7c473de88 100644 --- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp +++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp @@ -883,13 +883,19 @@ int QXcbKeyboard::keysymToQtKey(xcb_keysym_t key) const int QXcbKeyboard::keysymToQtKey(xcb_keysym_t keysym, Qt::KeyboardModifiers &modifiers, QString text) const { int code = 0; +#ifndef QT_NO_TEXTCODEC QTextCodec *systemCodec = QTextCodec::codecForLocale(); +#endif // Commentary in X11/keysymdef says that X codes match ASCII, so it // is safe to use the locale functions to process X codes in ISO8859-1. // This is mainly for compatibility - applications should not use the // Qt keycodes between 128 and 255 (extended ACSII codes), but should // rather use the QKeyEvent::text(). - if (keysym < 128 || (keysym < 256 && systemCodec->mibEnum() == 4)) { + if (keysym < 128 || (keysym < 256 +#ifndef QT_NO_TEXTCODEC + && systemCodec->mibEnum() == 4 +#endif + )) { // upper-case key, if known code = isprint((int)keysym) ? toupper((int)keysym) : 0; } else if (keysym >= XK_F1 && keysym <= XK_F35) { |