Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 9c91a561 authored by Laurent Montel's avatar Laurent Montel 😁

Remove QT_CHECK

parent c2225821
......@@ -59,11 +59,7 @@
#include <KConfigGroup>
#include <KMessageBox>
#if (QT_VERSION < QT_VERSION_CHECK(5, 10, 0))
#include <KRecursiveFilterProxyModel>
#else
#include <QSortFilterProxyModel>
#endif
#include "korganizer_debug.h"
#include <QAction>
......@@ -590,24 +586,13 @@ AkonadiCollectionView::AkonadiCollectionView(CalendarView *view, bool hasContext
searchProxy->setSourceModel(collectionFilter);
searchProxy->setObjectName(QStringLiteral("searchProxy"));
#if (QT_VERSION < QT_VERSION_CHECK(5, 10, 0))
KRecursiveFilterProxyModel *filterTreeViewModel = new KRecursiveFilterProxyModel(this);
filterTreeViewModel->setDynamicSortFilter(true);
filterTreeViewModel->setSourceModel(searchProxy);
filterTreeViewModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
// filterTreeViewModel->setObjectName( "Recursive filtering, for the search bar" );
connect(searchCol, &QLineEdit::textChanged, filterTreeViewModel,
&KRecursiveFilterProxyModel::setFilterWildcard);
#else
QSortFilterProxyModel *filterTreeViewModel = new QSortFilterProxyModel(this);
filterTreeViewModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
filterTreeViewModel->setRecursiveFilteringEnabled(true);
filterTreeViewModel->setDynamicSortFilter(true);
filterTreeViewModel->setSourceModel(searchProxy);
// filterTreeViewModel->setObjectName( "Recursive filtering, for the search bar" );
connect(searchCol, &QLineEdit::textChanged, filterTreeViewModel,
&QSortFilterProxyModel::setFilterWildcard);
#endif
SortProxyModel *searchSortProxy = new SortProxyModel(this);
searchSortProxy->setSourceModel(filterTreeViewModel);
......
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