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.
This commit is contained in:
Arnaud Bienner 2015-09-21 00:18:57 +02:00
parent 21ab4518d9
commit e83848edd1
1 changed files with 0 additions and 10 deletions

View File

@ -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> 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