summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-10-15 11:32:29 (GMT)
committeraxis <qt-info@nokia.com>2009-10-15 11:36:36 (GMT)
commit8af395611e6aa07c2de7b8d48c21cd8ced74087c (patch)
tree415c1bf547df625990678933e85f44f991c313ed /src
parentaaef78412021c2e02aa7c6aa355a09634a6fd549 (diff)
downloadQt-8af395611e6aa07c2de7b8d48c21cd8ced74087c.zip
Qt-8af395611e6aa07c2de7b8d48c21cd8ced74087c.tar.gz
Qt-8af395611e6aa07c2de7b8d48c21cd8ced74087c.tar.bz2
Made Mac Cocoa use the input method hints when deciding on IM.
New behavior is to turn them off when inputting numbers or hidden text, which is the way it was in Qt 4.5. Task: QT-1938 Task: QT-2257 RevBy: Prasanth Ullattil
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index b1c5fc5..cc1376f 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -1066,7 +1066,10 @@ extern "C" {
sendToPopup = true;
}
- if (widgetToGetKey->testAttribute(Qt::WA_InputMethodEnabled)) {
+ if (widgetToGetKey->testAttribute(Qt::WA_InputMethodEnabled)
+ && !(widgetToGetKey->inputMethodHints() & Qt::ImhDigitsOnly
+ || widgetToGetKey->inputMethodHints() & Qt::ImhFormattedNumbersOnly
+ || widgetToGetKey->inputMethodHints() & Qt::ImhHiddenText)) {
[qt_mac_nativeview_for(widgetToGetKey) interpretKeyEvents:[NSArray arrayWithObject: theEvent]];
}
if (sendKeyEvents && !composing) {