Commit 291158cd authored by Kevin Funk's avatar Kevin Funk

documentswitcher: Allow to cancel with Escape key

Related: https://phabricator.kde.org/D10306
parent bda9fd5a
......@@ -38,7 +38,12 @@ DocumentSwitcherTreeView::DocumentSwitcherTreeView(DocumentSwitcherPlugin* plugi
void DocumentSwitcherTreeView::keyPressEvent(QKeyEvent* event)
{
QTreeView::keyPressEvent(event);
if (event->key() == Qt::Key_Escape) {
event->accept();
hide();
} else {
QTreeView::keyPressEvent(event);
}
}
void DocumentSwitcherTreeView::keyReleaseEvent(QKeyEvent* event)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment