ProjectExplorer: Fix endless waiting when switching to Git editors

Show, Diff etc.

Change-Id: Ibdd6e61c72a9a8fd797a02d15dae7b8be08b405c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2020-02-04 23:40:55 +02:00
committed by Orgad Shaneh
parent b2ddeacfb5
commit d2dff64cba

View File

@@ -354,6 +354,8 @@ void ProjectTreeWidget::rowsInserted(const QModelIndex &parent, int start, int e
Node *ProjectTreeWidget::nodeForFile(const FilePath &fileName) Node *ProjectTreeWidget::nodeForFile(const FilePath &fileName)
{ {
if (fileName.isEmpty())
return nullptr;
Node *bestNode = nullptr; Node *bestNode = nullptr;
int bestNodeExpandCount = INT_MAX; int bestNodeExpandCount = INT_MAX;