Commit 4ca10060 authored by Ahmad Samir's avatar Ahmad Samir

[lspclient addon] Replace KRecursiveFilterProxyModel with QSortFilterProxyModel

KRecursiveFilterProxyModel was only needed to have recursive filtering, which
became available upstream since Qt 5.10.
parent 419b52bd
......@@ -27,7 +27,7 @@
#include <KLineEdit>
#include <KLocalizedString>
#include <KRecursiveFilterProxyModel>
#include <QSortFilterProxyModel>
#include <KTextEditor/Document>
#include <KTextEditor/MainWindow>
......@@ -160,7 +160,7 @@ class LSPClientSymbolViewImpl : public QObject, public LSPClientSymbolView
// last outline model we constructed
std::shared_ptr<QStandardItemModel> m_outline;
// filter model, setup once
KRecursiveFilterProxyModel m_filterModel;
QSortFilterProxyModel m_filterModel;
// cached icons for model
const QIcon m_icon_pkg = QIcon::fromTheme(QStringLiteral("code-block"));
......@@ -202,6 +202,7 @@ public:
m_filterModel.setFilterCaseSensitivity(Qt::CaseInsensitive);
m_filterModel.setSortCaseSensitivity(Qt::CaseInsensitive);
m_filterModel.setSourceModel(m_outline.get());
m_filterModel.setRecursiveFilteringEnabled(true);
m_symbols->setModel(&m_filterModel);
delete m;
......
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