Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.2
-
None
-
Mac OS X
Description
On Mac, QApplication::keyboardInputDirection() is not initialized until a key is pressed. This is a problem if this value is required before any key is pressed - for example, in QML, this is used to determine a default text alignment for Left-to-Right vs Right-to-Left locales.
It looks like this could be fixed by calling QKeyMapper::changeKeyboard() from qt_init() in qapplication_mac.mm, as is done in qapplication_win.cpp and qapplication_x11.cpp. Alternatively perhaps keyboardInputDirection could be set to a default value in the QKeyMapperPrivate constructor in qkeymapper_mac.cpp as is done for qkeymapper_x11.cpp and qkeymapper_qws.cpp.