Commit 9c03c738 authored by Mark Nauwelaerts's avatar Mark Nauwelaerts
Browse files

lspclient: restore symbolview sorting

parent 302c65a3
...@@ -127,6 +127,11 @@ public: ...@@ -127,6 +127,11 @@ public:
protected: protected:
bool lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const override bool lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const override
{ {
// make sure to honour configured sort-order (if no scoring applies)
if (m_pattern.isEmpty()) {
return QSortFilterProxyModel::lessThan(sourceLeft, sourceRight);
}
const int l = sourceLeft.data(WeightRole).toInt(); const int l = sourceLeft.data(WeightRole).toInt();
const int r = sourceRight.data(WeightRole).toInt(); const int r = sourceRight.data(WeightRole).toInt();
return l < r; return l < r;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment