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:
parent
21ab4518d9
commit
e83848edd1
10
3rdparty/qocoa/qsearchfield_mac.mm
vendored
10
3rdparty/qocoa/qsearchfield_mac.mm
vendored
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user