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
...@@ -104,6 +104,18 @@ void TodoOutputTreeView::resizeEvent(QResizeEvent *event) ...@@ -104,6 +104,18 @@ void TodoOutputTreeView::resizeEvent(QResizeEvent *event)
setColumnWidth(Constants::OUTPUT_COLUMN_FILE, widthFile); 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) void TodoOutputTreeView::todoColumnResized(int column, int oldSize, int newSize)
{ {
Q_UNUSED(oldSize); Q_UNUSED(oldSize);
......
...@@ -43,6 +43,7 @@ public: ...@@ -43,6 +43,7 @@ public:
~TodoOutputTreeView(); ~TodoOutputTreeView();
void resizeEvent(QResizeEvent *event); void resizeEvent(QResizeEvent *event);
void keyPressEvent(QKeyEvent *e);
private slots: private slots:
void todoColumnResized(int column, int oldSize, int newSize); void todoColumnResized(int column, int oldSize, int newSize);
......
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