Changeset View
Changeset View
Standalone View
Standalone View
src/akonadi/akonadiconfigdialog.cpp
Show All 37 Lines | |||||
38 | #include <AkonadiCore/AgentInstance> | 38 | #include <AkonadiCore/AgentInstance> | ||
39 | #include <AkonadiWidgets/AgentConfigurationDialog> | 39 | #include <AkonadiWidgets/AgentConfigurationDialog> | ||
40 | #include <AkonadiWidgets/AgentInstanceWidget> | 40 | #include <AkonadiWidgets/AgentInstanceWidget> | ||
41 | #include <AkonadiCore/AgentInstanceCreateJob> | 41 | #include <AkonadiCore/AgentInstanceCreateJob> | ||
42 | #include <AkonadiCore/AgentManager> | 42 | #include <AkonadiCore/AgentManager> | ||
43 | #include <AkonadiWidgets/AgentTypeDialog> | 43 | #include <AkonadiWidgets/AgentTypeDialog> | ||
44 | 44 | | |||
45 | #include <KCalCore/Todo> | 45 | #include <KCalCore/Todo> | ||
46 | #include <Akonadi/Notes/NoteUtils> | | |||
47 | 46 | | |||
48 | using namespace Akonadi; | 47 | using namespace Akonadi; | ||
49 | 48 | | |||
50 | ConfigDialog::ConfigDialog(StorageInterface::FetchContentTypes types, QWidget *parent) | 49 | ConfigDialog::ConfigDialog(StorageInterface::FetchContentTypes types, QWidget *parent) | ||
51 | : QDialog(parent), | 50 | : QDialog(parent), | ||
52 | m_agentInstanceWidget(new Akonadi::AgentInstanceWidget(this)), | 51 | m_agentInstanceWidget(new Akonadi::AgentInstanceWidget(this)), | ||
53 | m_types(types) | 52 | m_types(types) | ||
54 | { | 53 | { | ||
▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 143 | { | |||
146 | if (agent.isValid()) { | 145 | if (agent.isValid()) { | ||
147 | AgentConfigurationDialog dialog(agent, this); | 146 | AgentConfigurationDialog dialog(agent, this); | ||
148 | dialog.exec(); | 147 | dialog.exec(); | ||
149 | } | 148 | } | ||
150 | } | 149 | } | ||
151 | 150 | | |||
152 | void ConfigDialog::applyContentTypes(AgentFilterProxyModel *model) | 151 | void ConfigDialog::applyContentTypes(AgentFilterProxyModel *model) | ||
153 | { | 152 | { | ||
154 | if (m_types & StorageInterface::Notes) | | |||
155 | model->addMimeTypeFilter(NoteUtils::noteMimeType()); | | |||
156 | if (m_types & StorageInterface::Tasks) | 153 | if (m_types & StorageInterface::Tasks) | ||
157 | model->addMimeTypeFilter(KCalCore::Todo::todoMimeType()); | 154 | model->addMimeTypeFilter(KCalCore::Todo::todoMimeType()); | ||
158 | } | 155 | } | ||
159 | 156 | |