From 376369d4cee42194a320f65e8e66b3144b069627 Mon Sep 17 00:00:00 2001
From: dt <qtc-committer@nokia.com>
Date: Tue, 3 Aug 2010 14:15:02 +0200
Subject: [PATCH] Potential crash fix

The special event filter probably shouldn't eat the enter key if we are
in the editing state.
---
 src/libs/utils/navigationtreeview.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/libs/utils/navigationtreeview.cpp b/src/libs/utils/navigationtreeview.cpp
index efabd2f2a9f..dd1c0cc48ea 100644
--- a/src/libs/utils/navigationtreeview.cpp
+++ b/src/libs/utils/navigationtreeview.cpp
@@ -75,7 +75,8 @@ void NavigationTreeView::keyPressEvent(QKeyEvent *event)
     if ((event->key() == Qt::Key_Return
             || event->key() == Qt::Key_Enter)
             && event->modifiers() == 0
-            && currentIndex().isValid()) {
+            && currentIndex().isValid()
+            && state() != QAbstractItemView::EditingState) {
         emit activated(currentIndex());
         return;
     }
-- 
GitLab