Commit f9cb3754 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

Adapt to ETM ctor change in Akonadi lib

parent 9d9c2600
......@@ -25,7 +25,7 @@ set(AKONADI_CONTACTS_VERSION ${PIM_VERSION})
set(AKONADI_MIME_VERSION "5.3.40")
set(KCONTACTS_VERSION "5.3.44")
set(KMIMELIB_VERSION "5.3.40")
set(AKONADI_VERSION "5.3.40")
set(AKONADI_VERSION "5.3.45")
ecm_setup_version(${AKONADI_CONTACTS_VERSION} VARIABLE_PREFIX AKONADICONTACT
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/akonadi-contact_version.h"
......
......@@ -21,7 +21,7 @@
#include "contactcompletionmodel_p.h"
#include <changerecorder.h>
#include <monitor.h>
#include <entitymimetypefiltermodel.h>
#include <itemfetchscope.h>
#include <session.h>
......@@ -38,7 +38,7 @@ QAbstractItemModel *ContactCompletionModel::self()
return mSelf;
}
ChangeRecorder *monitor = new ChangeRecorder;
Monitor *monitor = new Monitor;
monitor->fetchCollection(true);
monitor->itemFetchScope().fetchFullPayload();
monitor->setCollectionMonitored(Akonadi::Collection::root());
......@@ -57,7 +57,7 @@ QAbstractItemModel *ContactCompletionModel::self()
return mSelf;
}
ContactCompletionModel::ContactCompletionModel(ChangeRecorder *monitor, QObject *parent)
ContactCompletionModel::ContactCompletionModel(Monitor *monitor, QObject *parent)
: EntityTreeModel(monitor, parent)
{
setCollectionFetchStrategy(InvisibleCollectionFetch);
......
......@@ -38,7 +38,7 @@ public:
EmailColumn ///< The preferred email of the contact.
};
explicit ContactCompletionModel(ChangeRecorder *monitor, QObject *parent = 0);
explicit ContactCompletionModel(Monitor *monitor, QObject *parent = 0);
virtual ~ContactCompletionModel();
QVariant entityData(const Item &item, int column, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
......
......@@ -46,7 +46,7 @@ public:
const int mIconSize;
};
ContactsTreeModel::ContactsTreeModel(ChangeRecorder *monitor, QObject *parent)
ContactsTreeModel::ContactsTreeModel(Monitor *monitor, QObject *parent)
: EntityTreeModel(monitor, parent)
, d(new Private)
{
......
......@@ -49,19 +49,19 @@ namespace Akonadi
* // fetch the EntityDisplayAttribute, which contains custom names and icons
* scope.fetchAttribute<Akonadi::EntityDisplayAttribute>();
*
* Akonadi::ChangeRecorder *changeRecorder = new Akonadi::ChangeRecorder;
* changeRecorder->setSession( session );
* Akonadi::Monitor *monitor = new Akonadi::Monitor;
* monitor->setSession( session );
* // include fetching the collection tree
* changeRecorder->fetchCollection( true );
* monitor->fetchCollection( true );
* // set the fetch scope that shall be used
* changeRecorder->setItemFetchScope( scope );
* monitor->setItemFetchScope( scope );
* // monitor all collections below the root collection for changes
* changeRecorder->setCollectionMonitored( Akonadi::Collection::root() );
* monitor->setCollectionMonitored( Akonadi::Collection::root() );
* // list only contacts and contact groups
* changeRecorder->setMimeTypeMonitored( KContacts::Addressee::mimeType(), true );
* changeRecorder->setMimeTypeMonitored( KContacts::ContactGroup::mimeType(), true );
* monitor->setMimeTypeMonitored( KContacts::Addressee::mimeType(), true );
* monitor->setMimeTypeMonitored( KContacts::ContactGroup::mimeType(), true );
*
* Akonadi::ContactsTreeModel *model = new Akonadi::ContactsTreeModel( changeRecorder );
* Akonadi::ContactsTreeModel *model = new Akonadi::ContactsTreeModel( monitor );
*
* Akonadi::ContactsTreeModel::Columns columns;
* columns << Akonadi::ContactsTreeModel::FullName;
......@@ -167,10 +167,10 @@ public:
/**
* Creates a new contacts tree model.
*
* @param monitor The ChangeRecorder whose entities should be represented in the model.
* @param monitor The Monitor whose entities should be represented in the model.
* @param parent The parent object.
*/
explicit ContactsTreeModel(ChangeRecorder *monitor, QObject *parent = Q_NULLPTR);
explicit ContactsTreeModel(Monitor *monitor, QObject *parent = Q_NULLPTR);
/**
* Destroys the contacts tree model.
......
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