summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/coreplugin/find/searchresulttreeview.cpp12
-rw-r--r--src/plugins/coreplugin/find/searchresulttreeview.h6
2 files changed, 3 insertions, 15 deletions
diff --git a/src/plugins/coreplugin/find/searchresulttreeview.cpp b/src/plugins/coreplugin/find/searchresulttreeview.cpp
index b900a2c14f..cb5a758881 100644
--- a/src/plugins/coreplugin/find/searchresulttreeview.cpp
+++ b/src/plugins/coreplugin/find/searchresulttreeview.cpp
@@ -39,7 +39,7 @@ namespace Core {
namespace Internal {
SearchResultTreeView::SearchResultTreeView(QWidget *parent)
- : QTreeView(parent)
+ : Utils::TreeView(parent)
, m_model(new SearchResultTreeModel(this))
, m_autoExpandResults(false)
{
@@ -90,16 +90,6 @@ void SearchResultTreeView::emitJumpToSearchResult(const QModelIndex &index)
emit jumpToSearchResult(item);
}
-void SearchResultTreeView::keyPressEvent(QKeyEvent *e)
-{
- if (!e->modifiers() && e->key() == Qt::Key_Return) {
- emit activated(currentIndex());
- e->accept();
- return;
- }
- QTreeView::keyPressEvent(e);
-}
-
SearchResultTreeModel *SearchResultTreeView::model() const
{
return m_model;
diff --git a/src/plugins/coreplugin/find/searchresulttreeview.h b/src/plugins/coreplugin/find/searchresulttreeview.h
index b5dcd792d3..3d28daaa7f 100644
--- a/src/plugins/coreplugin/find/searchresulttreeview.h
+++ b/src/plugins/coreplugin/find/searchresulttreeview.h
@@ -32,7 +32,7 @@
#include "searchresultwindow.h"
-#include <QTreeView>
+#include <utils/itemviews.h>
namespace Core {
namespace Internal {
@@ -40,7 +40,7 @@ namespace Internal {
class SearchResultTreeModel;
class SearchResultColor;
-class SearchResultTreeView : public QTreeView
+class SearchResultTreeView : public Utils::TreeView
{
Q_OBJECT
@@ -61,8 +61,6 @@ public slots:
void emitJumpToSearchResult(const QModelIndex &index);
protected:
- void keyPressEvent(QKeyEvent *e);
-
SearchResultTreeModel *m_model;
bool m_autoExpandResults;
};