Skip to content
Snippets Groups Projects
Commit 71d6b2b1 authored by Daniel Teske's avatar Daniel Teske
Browse files

Android Manifest Editor: Eat keyboard events


And thus prevent them from affecting the wrong widget

Change-Id: Iacf326630a80c2d53e8852ea8055d7bd5f87ed68
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 25f7952f
No related branches found
No related tags found
No related merge requests found
...@@ -137,6 +137,7 @@ void AndroidManifestEditorWidget::initializePage() ...@@ -137,6 +137,7 @@ void AndroidManifestEditorWidget::initializePage()
// If the user clicks on the mainwidget it gets focus, even though that's not visible // 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 // This is to prevent the parent, the actual basetexteditorwidget from getting focus
mainWidget->setFocusPolicy(Qt::WheelFocus); mainWidget->setFocusPolicy(Qt::WheelFocus);
mainWidget->installEventFilter(this);
Core::IContext *myContext = new Core::IContext(this); Core::IContext *myContext = new Core::IContext(this);
myContext->setWidget(mainWidget); myContext->setWidget(mainWidget);
...@@ -460,6 +461,12 @@ bool AndroidManifestEditorWidget::eventFilter(QObject *obj, QEvent *event) ...@@ -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); return TextEditor::PlainTextEditorWidget::eventFilter(obj, event);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment