Commit 034f0ee8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

[AkonadiConsole] Port to QSortFilterProxyModel from deprecated KRecursiveFilterProxyModel

Summary:
following https://phabricator.kde.org/D25595

WARNING: don't merge this until D25595 is accepted and merged

Reviewers: dvratil, winterz

Subscribers: kde-pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D25597
parent 66d7826e
......@@ -42,7 +42,7 @@ set(KDEPIM_LIB_SOVERSION "5")
set(AKONADI_CONTACT_VERSION "5.13.40")
set(CALENDARSUPPORT_LIB_VERSION_LIB "5.13.40")
set(AKONADI_VERSION "5.13.40")
set(AKONADI_VERSION "5.13.41")
set(AKONADI_SEARCH_VERSION "5.13.40")
set(QT_REQUIRED_VERSION "5.12.0")
......
......@@ -21,10 +21,11 @@
#include <QDebug>
JobTrackerFilterProxyModel::JobTrackerFilterProxyModel(QObject *parent)
: KRecursiveFilterProxyModel(parent),
: QSortFilterProxyModel(parent),
mSearchColumn(-1),
mShowOnlyFailed(false)
{
setRecursiveFilteringEnabled(true);
setDynamicSortFilter(true);
}
......@@ -32,7 +33,7 @@ JobTrackerFilterProxyModel::~JobTrackerFilterProxyModel()
{
}
bool JobTrackerFilterProxyModel::acceptRow(int sourceRow, const QModelIndex &sourceParent) const
bool JobTrackerFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
{
if (mShowOnlyFailed) {
const QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
......
......@@ -18,9 +18,9 @@
#ifndef JOBTRACKERFILTERPROXYMODEL_H
#define JOBTRACKERFILTERPROXYMODEL_H
#include <KRecursiveFilterProxyModel>
#include <QSortFilterProxyModel>
class JobTrackerFilterProxyModel : public KRecursiveFilterProxyModel
class JobTrackerFilterProxyModel : public QSortFilterProxyModel
{
Q_OBJECT
public:
......@@ -32,7 +32,7 @@ public:
void setShowOnlyFailed(bool showOnlyFailed);
protected:
bool acceptRow(int source_row, const QModelIndex &source_parent) const override;
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
private:
int mSearchColumn;
......
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