Commit ee6e0ae7 authored by Luca Beltrame's avatar Luca Beltrame
Browse files

More fixes due to BIC change

Please review, and ensure to check *all* users next time.

CCMAIL:dvratil@kde.org
parent ab9ea188
......@@ -28,7 +28,7 @@
class CategorisedEntityModel : public MixedTreeModel
{
public:
CategorisedEntityModel(Akonadi::ChangeRecorder *monitor, QObject *parent = Q_NULLPTR)
CategorisedEntityModel(Akonadi::Monitor *monitor, QObject *parent = Q_NULLPTR)
: MixedTreeModel(monitor, parent)
{
......
......@@ -27,7 +27,7 @@
#include <QVBoxLayout>
#include <QTimer>
#include <AkonadiCore/changerecorder.h>
#include <AkonadiCore/monitor.h>
#include <AkonadiCore/entitytreemodel.h>
#include <AkonadiCore/itemfetchscope.h>
......@@ -54,7 +54,7 @@ EntityTreeWidget::EntityTreeWidget(QWidget *parent)
m_treeView(new QTreeView),
m_typeComboBox(new QComboBox),
m_typeLineEdit(new QLineEdit),
m_changeRecorder(new ChangeRecorder(this))
m_monitor(new Monitor(this))
{
for (uint i = 0; i < sizeof predefinedMimeTypes / sizeof * predefinedMimeTypes; ++i) {
m_typeComboBox->addItem(predefinedUserVisibleMimeTypes[i], predefinedMimeTypes[i]);
......@@ -92,13 +92,13 @@ void EntityTreeWidget::mimeTypesChanged(const QString &mimetypeList)
{
QStringList list = mimetypeList.isEmpty() ? QStringList() : mimetypeList.split(QLatin1String(","));
foreach (const QString mimetype, m_changeRecorder->mimeTypesMonitored())
foreach (const QString mimetype, m_monitor->mimeTypesMonitored())
if (!list.contains(mimetype)) {
m_changeRecorder->setMimeTypeMonitored(mimetype, false);
m_monitor->setMimeTypeMonitored(mimetype, false);
}
foreach (const QString mimetype, list) {
m_changeRecorder->setMimeTypeMonitored(mimetype, true);
m_monitor->setMimeTypeMonitored(mimetype, true);
}
}
......@@ -124,14 +124,14 @@ void EntityTreeWidget::init()
connect(m_typeLineEdit, SIGNAL(textChanged(QString)), SLOT(mimeTypesChanged(QString)));
}
Akonadi::ChangeRecorder *EntityTreeWidget::changeRecorder() const
Akonadi::ChangeRecorder *EntityTreeWidget::monitor() const
{
return m_changeRecorder;
return m_monitor;
}
EntityTreeModel *EntityTreeWidget::getETM()
{
return new EntityTreeModel(m_changeRecorder, this);
return new EntityTreeModel(m_monitor, this);
}
static int num;
......
......@@ -32,7 +32,7 @@ class QComboBox;
namespace Akonadi
{
class EntityTreeModel;
class ChangeRecorder;
class Monitor;
}
class EntityTreeWidget : public QWidget
......@@ -45,7 +45,7 @@ public:
QTreeView *view() const;
Akonadi::EntityTreeModel *model() const;
Akonadi::ChangeRecorder *changeRecorder() const;
Akonadi::Monitor *monitor() const;
virtual void connectTreeToModel(QTreeView *tree, Akonadi::EntityTreeModel *model);
virtual QModelIndex mapToSource(const QModelIndex &index)
......@@ -69,7 +69,7 @@ private:
QLineEdit *m_typeLineEdit;
Akonadi::EntityTreeModel *m_etm;
Akonadi::ChangeRecorder *m_changeRecorder;
Akonadi::Monitor *m_monitor;
};
#endif
......@@ -46,7 +46,7 @@ public:
};
MailModel::MailModel(ChangeRecorder *monitor, QObject *parent)
MailModel::MailModel(Monitor *monitor, QObject *parent)
: EntityTreeModel(monitor, parent), d_ptr(new MailModelPrivate(this))
{
......
......@@ -23,7 +23,7 @@
#define MAILMODEL_H
#include <AkonadiCore/entitytreemodel.h>
#include <AkonadiCore/changerecorder.h>
#include <AkonadiCore/monitor.h>
using namespace Akonadi;
......@@ -34,7 +34,7 @@ class MailModel : public EntityTreeModel
Q_OBJECT
public:
explicit MailModel(ChangeRecorder *monitor, QObject *parent = Q_NULLPTR);
explicit MailModel(Monitor *monitor, QObject *parent = Q_NULLPTR);
virtual ~MailModel();
QVariant entityData(const Item &item, int column, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
......
......@@ -28,7 +28,7 @@
namespace Akonadi
{
class ChangeRecorder;
class Monitor;
}
class MixedTreeModel : public Akonadi::EntityTreeModel
......
......@@ -55,7 +55,7 @@ public:
}
/* reimp */ Akonadi::EntityTreeModel *getETM() Q_DECL_OVERRIDE {
return new MixedTreeModel(changeRecorder(), this);
return new MixedTreeModel(monitor(), this);
}
private:
......
......@@ -57,7 +57,7 @@ public:
}
/* reimp */ Akonadi::EntityTreeModel *getETM() Q_DECL_OVERRIDE {
return new MixedTreeModel(changeRecorder(), this);
return new MixedTreeModel(monitor(), this);
}
private:
......
......@@ -57,7 +57,7 @@ public:
}
/* reimp */ Akonadi::EntityTreeModel *getETM() Q_DECL_OVERRIDE {
return new MixedTreeModel(changeRecorder(), this);
return new MixedTreeModel(monitor(), this);
}
private:
......
......@@ -61,7 +61,7 @@ public:
}
Akonadi::EntityTreeModel *getETM() Q_DECL_OVERRIDE {
return new CategorisedEntityModel(changeRecorder(), this);
return new CategorisedEntityModel(monitor(), this);
}
private:
......
......@@ -68,7 +68,7 @@ public:
}
Akonadi::EntityTreeModel *getETM() Q_DECL_OVERRIDE {
MixedTreeModel *model = new MixedTreeModel(changeRecorder(), this);
MixedTreeModel *model = new MixedTreeModel(monitor(), this);
return model;
}
......
......@@ -50,8 +50,8 @@ public:
}
Akonadi::EntityTreeModel *getModel(Akonadi::ChangeRecorder *changeRecorder, QObject *parent) Q_DECL_OVERRIDE {
return new CategorisedEntityModel(changeRecorder, parent);
Akonadi::EntityTreeModel *getModel(Akonadi::Monitor *monitor, QObject *parent) Q_DECL_OVERRIDE {
return new CategorisedEntityModel(monitor, parent);
}
};
......
......@@ -40,6 +40,7 @@
#include "mailmodel.h"
#include <AkonadiCore/ChangeRecorder>
#include <AkonadiCore/Monitor>
#include <AkonadiCore/ItemFetchScope>
#include <AkonadiCore/entitymimetypefiltermodel.h>
#include <AkonadiCore/selectionproxymodel.h>
......@@ -89,7 +90,7 @@ UnreadMailsInCollectionsWidget::UnreadMailsInCollectionsWidget(QWidget *parent,
QSplitter *splitter = new QSplitter;
layout->addWidget(splitter);
m_changeRecorder = new Akonadi::ChangeRecorder(this);
m_changeRecorder = new Akonadi::Monitor(this);
m_changeRecorder->itemFetchScope().fetchFullPayload(true);
m_changeRecorder->setCollectionMonitored(Akonadi::Collection::root());
m_changeRecorder->setMimeTypeMonitored(KMime::Message::mimeType());
......
......@@ -35,6 +35,7 @@ namespace Akonadi
{
class ChangeRecorder;
class EntityTreeModel;
class Monitor;
}
class UnreadMailsInCollectionsProxy : public QSortFilterProxyModel
......@@ -59,7 +60,7 @@ private Q_SLOTS:
void restoreCheckState();
private:
Akonadi::ChangeRecorder *m_changeRecorder;
Akonadi::Monitor *m_changeRecorder;
Akonadi::EntityTreeModel *m_etm;
QItemSelectionModel *m_checkedItemModel;
KCheckableProxyModel *m_checkableProxy;
......
Supports Markdown
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