diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,7 @@ include(ECMMarkAsTest) include(ECMPoQmTools) +set(REQUIRED_QT_VERSION 5.10.0) find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Core Gui Widgets Test) find_package(Boost REQUIRED) find_package(Threads REQUIRED) diff --git a/src/widgets/quickselectdialog.h b/src/widgets/quickselectdialog.h --- a/src/widgets/quickselectdialog.h +++ b/src/widgets/quickselectdialog.h @@ -37,7 +37,7 @@ class QLabel; class QTreeView; -class KRecursiveFilterProxyModel; +class QSortFilterProxyModel; namespace Widgets { @@ -59,7 +59,7 @@ private: QString m_filter; QAbstractItemModel *m_model; - KRecursiveFilterProxyModel *m_filterProxyModel; + QSortFilterProxyModel *m_filterProxyModel; QLabel *m_label; QTreeView *m_tree; diff --git a/src/widgets/quickselectdialog.cpp b/src/widgets/quickselectdialog.cpp --- a/src/widgets/quickselectdialog.cpp +++ b/src/widgets/quickselectdialog.cpp @@ -30,25 +30,26 @@ #include #include #include +#include #include #include #include -#include using namespace Widgets; QuickSelectDialog::QuickSelectDialog(QWidget *parent) : QDialog(parent), m_model(nullptr), - m_filterProxyModel(new KRecursiveFilterProxyModel(this)), + m_filterProxyModel(new QSortFilterProxyModel(this)), m_label(new QLabel(this)), m_tree(new QTreeView(this)) { setWindowTitle(i18n("Quick Select Dialog")); m_label->setText(i18n("You can start typing to filter the list of available pages")); m_filterProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive); + m_filterProxyModel->setRecursiveFilteringEnabled(true); m_tree->setModel(m_filterProxyModel); m_tree->setObjectName(QStringLiteral("pagesView"));