Skip to content
Snippets Groups Projects
Commit f967c3b5 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Todo: Jump to entry on Return


Change-Id: Ia0516b766354a6c6fd8dedb645961805a36c2105
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 6f600a94
No related branches found
No related tags found
No related merge requests found
......@@ -104,6 +104,18 @@ void TodoOutputTreeView::resizeEvent(QResizeEvent *event)
setColumnWidth(Constants::OUTPUT_COLUMN_FILE, widthFile);
}
void TodoOutputTreeView::keyPressEvent(QKeyEvent *e)
{
if (!e->modifiers()
&& (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter)
&& currentIndex().isValid()) {
emit clicked(currentIndex());
e->accept();
return;
}
QTreeView::keyPressEvent(e);
}
void TodoOutputTreeView::todoColumnResized(int column, int oldSize, int newSize)
{
Q_UNUSED(oldSize);
......
......@@ -43,6 +43,7 @@ public:
~TodoOutputTreeView();
void resizeEvent(QResizeEvent *event);
void keyPressEvent(QKeyEvent *e);
private slots:
void todoColumnResized(int column, int oldSize, int newSize);
......
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