summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/classview/classviewsymbolinformation.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/classview/classviewsymbolinformation.cpp b/src/plugins/classview/classviewsymbolinformation.cpp
index b1bee4be56..ec385d4a70 100644
--- a/src/plugins/classview/classviewsymbolinformation.cpp
+++ b/src/plugins/classview/classviewsymbolinformation.cpp
@@ -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)