Change sorting in Class View to case insensitive

Change-Id: Ia9ee6726d1d423a127c1e3e57c02ebef8a6f28dd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Alp Öz
2021-08-02 12:59:38 +02:00
parent 41528390b8
commit 4c35c9e057

View File

@@ -123,7 +123,14 @@ bool SymbolInformation::operator<(const SymbolInformation &other) const
return false; return false;
} }
int cmp = name().compare(other.name()); // The desired behavior here is to facilitate case insensitive
// sorting without generating false case sensitive equalities.
// Performance should be appropriate since in C++ there aren't
// many symbols that differ by case only.
int cmp = name().compare(other.name(), Qt::CaseInsensitive);
if (cmp == 0)
cmp = name().compare(other.name());
if (cmp < 0) if (cmp < 0)
return true; return true;
if (cmp > 0) if (cmp > 0)