From e83848edd17ae2b04f7a7af1f5273060c80ed4e1 Mon Sep 17 00:00:00 2001 From: Arnaud Bienner Date: Mon, 21 Sep 2015 00:18:57 +0200 Subject: [PATCH] Seems we don't need this anymore. Not sure when it was needed at some point, but now pressing "Esc" correctly cleans the search field. And this code (which also cleans the search field) was triggered in other situation, when pressing Cmd+A for example. --- 3rdparty/qocoa/qsearchfield_mac.mm | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/3rdparty/qocoa/qsearchfield_mac.mm b/3rdparty/qocoa/qsearchfield_mac.mm index 9b856f38f..f1f5d8ccf 100644 --- a/3rdparty/qocoa/qsearchfield_mac.mm +++ b/3rdparty/qocoa/qsearchfield_mac.mm @@ -59,14 +59,6 @@ public: } } - void escapePressed() - { - if (qSearchField) { - QKeyEvent* event = new QKeyEvent(QEvent::KeyPress, Qt::Key_Escape, Qt::NoModifier); - QApplication::postEvent(qSearchField, event); - } - } - QPointer qSearchField; NSSearchField *nsSearchField; }; @@ -95,8 +87,6 @@ public: if ([[[notification userInfo] objectForKey:@"NSTextMovement"] intValue] == NSReturnTextMovement) pimpl->returnPressed(); - else if ([[[notification userInfo] objectForKey:@"NSTextMovement"] intValue] == NSOtherTextMovement) - pimpl->escapePressed(); } @end