diff --git a/src/analyze/CMakeLists.txt b/src/analyze/CMakeLists.txt --- a/src/analyze/CMakeLists.txt +++ b/src/analyze/CMakeLists.txt @@ -31,7 +31,7 @@ add_subdirectory(print) if(HEAPTRACK_BUILD_GUI) - find_package(Qt5 5.2.0 NO_MODULE OPTIONAL_COMPONENTS Widgets) + find_package(Qt5 5.10.0 NO_MODULE OPTIONAL_COMPONENTS Widgets) find_package(ECM 1.0.0 NO_MODULE) if(Qt5_FOUND AND ECM_FOUND) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) diff --git a/src/analyze/gui/mainwindow.cpp b/src/analyze/gui/mainwindow.cpp --- a/src/analyze/gui/mainwindow.cpp +++ b/src/analyze/gui/mainwindow.cpp @@ -24,7 +24,6 @@ #include #include -#include #include #include diff --git a/src/analyze/gui/treeproxy.h b/src/analyze/gui/treeproxy.h --- a/src/analyze/gui/treeproxy.h +++ b/src/analyze/gui/treeproxy.h @@ -19,9 +19,9 @@ #ifndef TREEPROXY_H #define TREEPROXY_H -#include +#include -class TreeProxy final : public KRecursiveFilterProxyModel +class TreeProxy final : public QSortFilterProxyModel { Q_OBJECT public: @@ -33,7 +33,7 @@ void setModuleFilter(const QString& moduleFilter); private: - bool acceptRow(int source_row, const QModelIndex& source_parent) const override; + bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override; int m_functionColumn; int m_moduleColumn; diff --git a/src/analyze/gui/treeproxy.cpp b/src/analyze/gui/treeproxy.cpp --- a/src/analyze/gui/treeproxy.cpp +++ b/src/analyze/gui/treeproxy.cpp @@ -21,10 +21,11 @@ #include TreeProxy::TreeProxy(int functionColumn, int moduleColumn, QObject* parent) - : KRecursiveFilterProxyModel(parent) + : QSortFilterProxyModel(parent) , m_functionColumn(functionColumn) , m_moduleColumn(moduleColumn) { + setRecursiveFilteringEnabled(true); setSortLocaleAware(false); } @@ -42,7 +43,7 @@ invalidate(); } -bool TreeProxy::acceptRow(int sourceRow, const QModelIndex& sourceParent) const +bool TreeProxy::filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const { auto source = sourceModel(); if (!source) {