Pre-accept events
Key handler expects events to be accepted, and will ignore them if necessary. Change-Id: I8ee110d70c98ff7c2de107b44e7d51aab12678c4 Reviewed-by: Michael Brasser (cherry picked from commit 6476bbea1d7905f083789224accc8f4b43a0779b)
This commit is contained in:
parent
31dd5d55dd
commit
f837a28854
|
@ -1521,6 +1521,7 @@ bool QSGCanvas::sendEvent(QSGItem *item, QEvent *e)
|
|||
switch (e->type()) {
|
||||
case QEvent::KeyPress:
|
||||
case QEvent::KeyRelease:
|
||||
e->accept();
|
||||
QSGItemPrivate::get(item)->deliverKeyEvent(static_cast<QKeyEvent *>(e));
|
||||
while (!e->isAccepted() && (item = item->parentItem())) {
|
||||
e->accept();
|
||||
|
@ -1528,6 +1529,7 @@ bool QSGCanvas::sendEvent(QSGItem *item, QEvent *e)
|
|||
}
|
||||
break;
|
||||
case QEvent::InputMethod:
|
||||
e->accept();
|
||||
QSGItemPrivate::get(item)->deliverInputMethodEvent(static_cast<QInputMethodEvent *>(e));
|
||||
while (!e->isAccepted() && (item = item->parentItem())) {
|
||||
e->accept();
|
||||
|
|
Loading…
Reference in New Issue