summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qkeymapper_x11.cpp
diff options
context:
space:
mode:
authorLorn Potter <lopotter@ljp-linux-vm.localdomain>2010-06-17 04:11:33 (GMT)
committerLorn Potter <lopotter@ljp-linux-vm.localdomain>2010-06-17 04:11:33 (GMT)
commit8335adf60299b728c0bf7a346a5afd94a3d56712 (patch)
treea8057969ac369ddffec9fa2b92e10cdf1fc319eb /src/gui/kernel/qkeymapper_x11.cpp
parent0948de26bca9a68a354b436895bdf9e2db9c4288 (diff)
parent30c8d1e3dccc83499ac3d76284cfb2e8d860808a (diff)
downloadQt-8335adf60299b728c0bf7a346a5afd94a3d56712.zip
Qt-8335adf60299b728c0bf7a346a5afd94a3d56712.tar.gz
Qt-8335adf60299b728c0bf7a346a5afd94a3d56712.tar.bz2
Merge branch '4.7' of git://gitorious.org/qt/qt into 4.7
Diffstat (limited to 'src/gui/kernel/qkeymapper_x11.cpp')
-rw-r--r--src/gui/kernel/qkeymapper_x11.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/gui/kernel/qkeymapper_x11.cpp b/src/gui/kernel/qkeymapper_x11.cpp
index 807959c..825edbc 100644
--- a/src/gui/kernel/qkeymapper_x11.cpp
+++ b/src/gui/kernel/qkeymapper_x11.cpp
@@ -80,22 +80,15 @@ QT_BEGIN_NAMESPACE
(((KeySym)(keysym) >= 0x11000000) && ((KeySym)(keysym) <= 0x1100FFFF))
#endif
-void q_getLocaleAndDirection(QLocale *locale,
- Qt::LayoutDirection *direction,
- const QByteArray &layoutName,
- const QByteArray &variantName)
+QLocale q_getKeyboardLocale(const QByteArray &layoutName, const QByteArray &variantName)
{
int i = 0;
while (xkbLayoutData[i].layout != 0) {
- if (layoutName == xkbLayoutData[i].layout && variantName == xkbLayoutData[i].variant) {
- *locale = QLocale(xkbLayoutData[i].language, xkbLayoutData[i].country);
- *direction = xkbLayoutData[i].direction;
- return;
- }
+ if (layoutName == xkbLayoutData[i].layout && variantName == xkbLayoutData[i].variant)
+ return QLocale(xkbLayoutData[i].language, xkbLayoutData[i].country);
++i;
}
- *locale = QLocale::c();
- *direction = Qt::LeftToRight;
+ return QLocale::c();
}
#endif // QT_NO_XKB
@@ -523,10 +516,8 @@ void QKeyMapperPrivate::clearMappings()
// if (keyboardLayoutName.isEmpty())
// qWarning("Qt: unable to determine keyboard layout, please talk to qt-bugs@trolltech.com"); ?
- q_getLocaleAndDirection(&keyboardInputLocale,
- &keyboardInputDirection,
- layoutName,
- variantName);
+ keyboardInputLocale = q_getKeyboardLocale(layoutName, variantName);
+ keyboardInputDirection = keyboardInputLocale.textDirection();
#if 0
qDebug() << "keyboard input locale ="