summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qkeymapper_mac.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2010-06-05 23:15:16 +0200
committerLars Knoll <lars.knoll@nokia.com>2010-06-10 00:08:28 +0200
commitda603c7c80ea14df18790ae77f5de82880307650 (patch)
tree9e1703c20595ecab1c0efe8f77b32f25996c60aa /src/gui/kernel/qkeymapper_mac.cpp
parent424735f91dbf5847640aca4011a309dbef7b1e31 (diff)
Fixed some bugs in detection of keyboard directionality
The mapping table on X11 had a few bugs. Implemented rudimentary support on QWS and fixed a tiny issue on Mac. Reviewed-by: Simon Hausmann
Diffstat (limited to 'src/gui/kernel/qkeymapper_mac.cpp')
-rw-r--r--src/gui/kernel/qkeymapper_mac.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/gui/kernel/qkeymapper_mac.cpp b/src/gui/kernel/qkeymapper_mac.cpp
index a7145d4f2f..885f5baf14 100644
--- a/src/gui/kernel/qkeymapper_mac.cpp
+++ b/src/gui/kernel/qkeymapper_mac.cpp
@@ -672,23 +672,7 @@ QKeyMapperPrivate::updateKeyboard()
#endif
if (iso639Code) {
keyboardInputLocale = QLocale(QCFString::toQString(iso639Code));
- QString monday = keyboardInputLocale.dayName(1);
- bool rtl = false;
- for (int i = 0; i < monday.length(); ++i) {
- switch (monday.at(i).direction()) {
- default:
- break;
- case QChar::DirR:
- case QChar::DirAL:
- case QChar::DirRLE:
- case QChar::DirRLO:
- rtl = true;
- break;
- }
- if (rtl)
- break;
- }
- keyboardInputDirection = rtl ? Qt::RightToLeft : Qt::LeftToRight;
+ keyboardInputDirection = keyboardInputLocale.isWrittenRightToLeft() ? Qt::RightToLeft : Qt::LeftToRight;
} else {
keyboardInputLocale = QLocale::c();
keyboardInputDirection = Qt::LeftToRight;