From 21c25bd1aeae4ed404ef3544e5a39e597a6fb90f Mon Sep 17 00:00:00 2001
From: Eike Ziller <eike.ziller@theqtcompany.com>
Date: Wed, 9 Mar 2016 13:47:48 +0100
Subject: [PATCH] Fix disambiguated display name on case insensitive file
 systems

blah/Foo/bar.cpp and blubb/foo/bar.cpp should not be shown as
Foo/bar.cpp and foo/bar.cpp

Change-Id: I900606c63996eea4c11d09ff13579b6cc031a8c6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
---
 src/plugins/coreplugin/editormanager/documentmodel.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/plugins/coreplugin/editormanager/documentmodel.cpp b/src/plugins/coreplugin/editormanager/documentmodel.cpp
index 64c20e370d0..4fb99ae9a5b 100644
--- a/src/plugins/coreplugin/editormanager/documentmodel.cpp
+++ b/src/plugins/coreplugin/editormanager/documentmodel.cpp
@@ -31,6 +31,7 @@
 
 #include <utils/algorithm.h>
 #include <utils/dropsupport.h>
+#include <utils/hostosinfo.h>
 #include <utils/qtcassert.h>
 
 #include <QAbstractItemModel>
@@ -323,7 +324,7 @@ bool DocumentModelPrivate::disambiguateDisplayNames(DocumentModel::Entry *entry)
                 }
                 for (int j = i + 1; j < dupsCount; ++j) {
                     DynamicEntry &e2 = dups[j];
-                    if (e->displayName() == e2->displayName()) {
+                    if (e->displayName().compare(e2->displayName(), Utils::HostOsInfo::fileNameCaseSensitivity()) == 0) {
                         const Utils::FileName otherFileName = e2->document->filePath();
                         if (otherFileName.isEmpty())
                             continue;
-- 
GitLab