diff options
author | Morten Sorvig <msorvig@trolltech.com> | 2009-09-03 10:17:39 (GMT) |
---|---|---|
committer | Morten Sorvig <msorvig@trolltech.com> | 2009-09-03 10:17:39 (GMT) |
commit | 0dcf114697309f3f23f9717b608fa2be1813fe94 (patch) | |
tree | 3f8702e3e58f3c1a40fff7f05d4ad7dfe167f8c9 /src | |
parent | 992a3cb734cae82a4df6c3481138379b90bdc404 (diff) | |
download | Qt-0dcf114697309f3f23f9717b608fa2be1813fe94.zip Qt-0dcf114697309f3f23f9717b608fa2be1813fe94.tar.gz Qt-0dcf114697309f3f23f9717b608fa2be1813fe94.tar.bz2 |
Revert ed00fff3cb.
This caused dublicate key events in come cases, for example
in the Qt Creator quick serach line edit.
RevBy: TrustMe
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qcocoaview_mac.mm | 11 | ||||
-rw-r--r-- | src/gui/kernel/qcocoaview_mac_p.h | 1 |
2 files changed, 1 insertions, 11 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index bc32078..59494a7 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -201,7 +201,6 @@ extern "C" { composingText = new QString(); composing = false; sendKeyEvents = true; - inKeyDown = false; currentCustomTypes = 0; [self setHidden:YES]; return self; @@ -1037,7 +1036,6 @@ extern "C" { - (void)keyDown:(NSEvent *)theEvent { - inKeyDown = true; sendKeyEvents = true; QWidget *widgetToGetKey = qwidget; @@ -1057,7 +1055,6 @@ extern "C" { if (!keyOK && !sendToPopup) [super keyDown:theEvent]; } - inKeyDown = false; } @@ -1104,13 +1101,7 @@ extern "C" { }; } - if ([aString length] && !inKeyDown) { - // Handle the case where insertText is called from somewhere else than the keyDown - // implementation, for example when inserting text from the character palette. - QInputMethodEvent e; - e.setCommitString(commitText); - qt_sendSpontaneousEvent(qwidget, &e); - } else if ([aString length] && composing) { + if ([aString length] && composing) { // Send the commit string to the widget. composing = false; sendKeyEvents = false; diff --git a/src/gui/kernel/qcocoaview_mac_p.h b/src/gui/kernel/qcocoaview_mac_p.h index 9d4e3d0..3810a2b 100644 --- a/src/gui/kernel/qcocoaview_mac_p.h +++ b/src/gui/kernel/qcocoaview_mac_p.h @@ -86,7 +86,6 @@ Q_GUI_EXPORT bool composing; int composingLength; bool sendKeyEvents; - bool inKeyDown; QString *composingText; QStringList *currentCustomTypes; NSInteger dragEnterSequence; |