forked from qt-creator/qt-creator
Android Manifest Editor: Eat keyboard events
And thus prevent them from affecting the wrong widget Change-Id: Iacf326630a80c2d53e8852ea8055d7bd5f87ed68 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -137,6 +137,7 @@ void AndroidManifestEditorWidget::initializePage()
|
||||
// If the user clicks on the mainwidget it gets focus, even though that's not visible
|
||||
// This is to prevent the parent, the actual basetexteditorwidget from getting focus
|
||||
mainWidget->setFocusPolicy(Qt::WheelFocus);
|
||||
mainWidget->installEventFilter(this);
|
||||
|
||||
Core::IContext *myContext = new Core::IContext(this);
|
||||
myContext->setWidget(mainWidget);
|
||||
@@ -460,6 +461,12 @@ bool AndroidManifestEditorWidget::eventFilter(QObject *obj, QEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
if (obj == m_overlayWidget)
|
||||
if (event->type() == QEvent::KeyPress
|
||||
|| event->type() == QEvent::KeyRelease) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return TextEditor::PlainTextEditorWidget::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user