forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/dropsupport.h>
|
#include <utils/dropsupport.h>
|
||||||
|
#include <utils/hostosinfo.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <QAbstractItemModel>
|
#include <QAbstractItemModel>
|
||||||
@@ -323,7 +324,7 @@ bool DocumentModelPrivate::disambiguateDisplayNames(DocumentModel::Entry *entry)
|
|||||||
}
|
}
|
||||||
for (int j = i + 1; j < dupsCount; ++j) {
|
for (int j = i + 1; j < dupsCount; ++j) {
|
||||||
DynamicEntry &e2 = dups[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();
|
const Utils::FileName otherFileName = e2->document->filePath();
|
||||||
if (otherFileName.isEmpty())
|
if (otherFileName.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user