diff options
author | David Boddie <dboddie@trolltech.com> | 2010-06-28 11:10:40 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-06-28 11:10:40 (GMT) |
commit | 8f3cbe7e844ee49b1e25544d9b90218b00efa548 (patch) | |
tree | 73e501612ef8efdbfce8afbc5d8c6abe109190d3 /src/gui/kernel/qt_cocoa_helpers_mac.mm | |
parent | 00cb03e2dfbcaca69da980dc79d5b062d4b09028 (diff) | |
parent | 5b90f7c27e7e4a95c75421fa42345b3268707794 (diff) | |
download | Qt-8f3cbe7e844ee49b1e25544d9b90218b00efa548.zip Qt-8f3cbe7e844ee49b1e25544d9b90218b00efa548.tar.gz Qt-8f3cbe7e844ee49b1e25544d9b90218b00efa548.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'src/gui/kernel/qt_cocoa_helpers_mac.mm')
-rw-r--r-- | src/gui/kernel/qt_cocoa_helpers_mac.mm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 8cef03c..3fc27f4 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -682,10 +682,12 @@ bool qt_dispatchKeyEvent(void * /*NSEvent * */ keyEvent, QWidget *widgetToGetEve NSEvent *event = static_cast<NSEvent *>(keyEvent); EventRef key_event = static_cast<EventRef>(const_cast<void *>([event eventRef])); Q_ASSERT(key_event); + unsigned int info = 0; if ([event type] == NSKeyDown) { NSString *characters = [event characters]; unichar value = [characters characterAtIndex:0]; qt_keymapper_private()->updateKeyMap(0, key_event, (void *)&value); + info = value; } // Redirect keys to alien widgets. @@ -701,9 +703,8 @@ bool qt_dispatchKeyEvent(void * /*NSEvent * */ keyEvent, QWidget *widgetToGetEve if (mustUseCocoaKeyEvent()) return qt_dispatchKeyEventWithCocoa(keyEvent, widgetToGetEvent); - bool isAccepted; - bool consumed = qt_keymapper_private()->translateKeyEvent(widgetToGetEvent, 0, key_event, &isAccepted, true); - return consumed && isAccepted; + bool consumed = qt_keymapper_private()->translateKeyEvent(widgetToGetEvent, 0, key_event, &info, true); + return consumed && (info != 0); #endif } |