forked from qt-creator/qt-creator
Change sorting in Class View to case insensitive
Change-Id: Ia9ee6726d1d423a127c1e3e57c02ebef8a6f28dd Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -123,7 +123,14 @@ bool SymbolInformation::operator<(const SymbolInformation &other) const
|
||||
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)
|
||||
return true;
|
||||
if (cmp > 0)
|
||||
|
||||
Reference in New Issue
Block a user