diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-01-21 11:46:46 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-01-21 11:46:46 +0100 |
commit | 42d34555397dd62399233fac1fbfa216c255ef68 (patch) | |
tree | be2a6cd0442915bbc39243d8423d717c8727fa25 | |
parent | bf96cfa0d75d256e036c76ec64f0f456014f2739 (diff) | |
download | kube-42d34555397dd62399233fac1fbfa216c255ef68.tar.gz kube-42d34555397dd62399233fac1fbfa216c255ef68.zip |
Akonadi2 -> Sink
20 files changed, 56 insertions, 56 deletions
@@ -1,7 +1,7 @@ | |||
1 | ## Kube | 1 | ## Kube |
2 | 2 | ||
3 | Kube is a personal information and collaboration application currently in its early | 3 | Kube is a personal information and collaboration application currently in its early |
4 | stages of development. It uses Akonadi Next for data access and synchronization, and | 4 | stages of development. It uses Sink for data access and synchronization, and |
5 | leverages the KDE PIM codebase where possible. | 5 | leverages the KDE PIM codebase where possible. |
6 | 6 | ||
7 | See doc/project.md for more information. | 7 | See doc/project.md for more information. |
diff --git a/applications/kube-accounts/Maildir.qml b/applications/kube-accounts/Maildir.qml index e3074c31..ed2decc4 100644 --- a/applications/kube-accounts/Maildir.qml +++ b/applications/kube-accounts/Maildir.qml | |||
@@ -3,7 +3,7 @@ import QtQuick.Controls 1.3 | |||
3 | import QtQuick.Layouts 1.1 | 3 | import QtQuick.Layouts 1.1 |
4 | import QtQuick.Dialogs 1.0 | 4 | import QtQuick.Dialogs 1.0 |
5 | 5 | ||
6 | import org.kde.akonadi2.settings 1.0 as Settings | 6 | import org.kde.sink.settings 1.0 as Settings |
7 | 7 | ||
8 | Item { | 8 | Item { |
9 | id: root | 9 | id: root |
diff --git a/applications/kube-mail-mobile/main.qml b/applications/kube-mail-mobile/main.qml index 751c080c..914a21d5 100644 --- a/applications/kube-mail-mobile/main.qml +++ b/applications/kube-mail-mobile/main.qml | |||
@@ -34,7 +34,7 @@ ApplicationWindow { | |||
34 | 34 | ||
35 | anchors.fill: parent | 35 | anchors.fill: parent |
36 | 36 | ||
37 | //TODO set akonadi folderId property | 37 | //TODO set sink folderId property |
38 | initialItem: {"item": Qt.resolvedUrl("FolderListView.qml"),properties: {stack: stack}} | 38 | initialItem: {"item": Qt.resolvedUrl("FolderListView.qml"),properties: {stack: stack}} |
39 | } | 39 | } |
40 | 40 | ||
diff --git a/applications/kube-mail/package/contents/ui/example.qml b/applications/kube-mail/package/contents/ui/example.qml index a968bc72..e0c0a077 100644 --- a/applications/kube-mail/package/contents/ui/example.qml +++ b/applications/kube-mail/package/contents/ui/example.qml | |||
@@ -19,7 +19,7 @@ import QtQuick 2.4 | |||
19 | import QtQuick.Controls 1.3 | 19 | import QtQuick.Controls 1.3 |
20 | import QtQuick.Layouts 1.1 | 20 | import QtQuick.Layouts 1.1 |
21 | 21 | ||
22 | import org.kde.akonadi2.mail 1.0 | 22 | import org.kde.sink.mail 1.0 |
23 | 23 | ||
24 | Item { | 24 | Item { |
25 | id: root | 25 | id: root |
diff --git a/docs/design.md b/docs/design.md index 38edde01..1330cc28 100644 --- a/docs/design.md +++ b/docs/design.md | |||
@@ -17,7 +17,7 @@ The overall architecture is split into three layers; Ui, Domain Logic and Infras | |||
17 | | | | 17 | | | |
18 | +--------------+------+------+ | 18 | +--------------+------+------+ |
19 | | | | | | 19 | | | | | |
20 | | Akonadi Next |Config| ... | | 20 | | Sink |Config| ... | |
21 | | | | | | 21 | | | | | |
22 | +--------------+------+------+ | 22 | +--------------+------+------+ |
23 | ``` | 23 | ``` |
@@ -28,7 +28,7 @@ The domain logic layer holds the application state. It povides models to access | |||
28 | 28 | ||
29 | The infrastructure layer provides: | 29 | The infrastructure layer provides: |
30 | 30 | ||
31 | * Data access (Akonadi Next) | 31 | * Data access (Sink) |
32 | * Configuration (Config files, etc.) | 32 | * Configuration (Config files, etc.) |
33 | * Various functionality provided by libraries (email sending, ldap, iTip handling, iCal implementation (kcalcore), vCard implementation, ...) | 33 | * Various functionality provided by libraries (email sending, ldap, iTip handling, iCal implementation (kcalcore), vCard implementation, ...) |
34 | Various bits of the infrastructure layer may be exchanged on different platforms, to i.e. integrate into native infrastructure providers on a platform. | 34 | Various bits of the infrastructure layer may be exchanged on different platforms, to i.e. integrate into native infrastructure providers on a platform. |
@@ -64,7 +64,7 @@ If nothing handles the action, the root component (the shell)can switch to the n | |||
64 | ## Third party users of components | 64 | ## Third party users of components |
65 | Since components are self contained and made available throuh the KPackage sytem, external applications can load fully functional Kube components. | 65 | Since components are self contained and made available throuh the KPackage sytem, external applications can load fully functional Kube components. |
66 | 66 | ||
67 | For example, the KDE calendar plasmoid could load the Kube Event Viewer component when available, and thus provide Kube's full functionality of that component, including all actions etc, without having to reimplement the Domain Logic (as is the case if only data access is provided through akonadi). | 67 | For example, the KDE calendar plasmoid could load the Kube Event Viewer component when available, and thus provide Kube's full functionality of that component, including all actions etc, without having to reimplement the Domain Logic (as is the case if only data access is provided through Sink). |
68 | 68 | ||
69 | ## Domain Logic | 69 | ## Domain Logic |
70 | 70 | ||
@@ -123,10 +123,10 @@ Notifications can be displayed in various places of the application. | |||
123 | The infrastructure layer interfaces with the rest of the system. It is the place where we can integrate with various native infrastructure parts. | 123 | The infrastructure layer interfaces with the rest of the system. It is the place where we can integrate with various native infrastructure parts. |
124 | The interface of the infrastructure layer, that is used by the domain logic, may not expose any implementation details of any infrastructure part, to ensure that all infrastructure parts are exchangable. | 124 | The interface of the infrastructure layer, that is used by the domain logic, may not expose any implementation details of any infrastructure part, to ensure that all infrastructure parts are exchangable. |
125 | 125 | ||
126 | ### Akonadi Next | 126 | ### Sink |
127 | Akonadi Next is used for primary data access and handles all synchronization. | 127 | Sink is used for primary data access and handles all synchronization. |
128 | 128 | ||
129 | Interactions with Akonadi Next involve: | 129 | Interactions with Sink involve: |
130 | 130 | ||
131 | * Adding/removing/configuring resources | 131 | * Adding/removing/configuring resources |
132 | * Triggering synchronization | 132 | * Triggering synchronization |
@@ -223,7 +223,7 @@ KubeComponents.MailView { | |||
223 | * Move/Copy/Delete folder | 223 | * Move/Copy/Delete folder |
224 | * Synchronize folder | 224 | * Synchronize folder |
225 | * Folder List Model | 225 | * Folder List Model |
226 | * Mixes akonadi next queries and subqueries (folder list with smart folders) | 226 | * Mixes Sink queries and subqueries (folder list with smart folders) |
227 | * name | 227 | * name |
228 | * statistics | 228 | * statistics |
229 | 229 | ||
diff --git a/docs/requirements.md b/docs/requirements.md index 75b43c8f..22de0cb5 100644 --- a/docs/requirements.md +++ b/docs/requirements.md | |||
@@ -63,7 +63,7 @@ Currently available dependencies: | |||
63 | ## Requirements | 63 | ## Requirements |
64 | * Each module has at least rudimentary tests that can then be extended | 64 | * Each module has at least rudimentary tests that can then be extended |
65 | * Tests need to be deterministic, no random timeouts to check if something already happened, only `QTRY_VERIFY` and alike is allowed. | 65 | * Tests need to be deterministic, no random timeouts to check if something already happened, only `QTRY_VERIFY` and alike is allowed. |
66 | * Clear layering. No depending on akonadi from everywhere. | 66 | * Clear layering. No depending on Sink from everywhere. |
67 | * Each module comes with a clear set of justified dependencies. | 67 | * Each module comes with a clear set of justified dependencies. |
68 | * Commented code is only allowed in conjunction with a task in phabricator. No dead/commented code. | 68 | * Commented code is only allowed in conjunction with a task in phabricator. No dead/commented code. |
69 | * Each module requires a clear interface that allows the module internals to be replaced eventually. | 69 | * Each module requires a clear interface that allows the module internals to be replaced eventually. |
@@ -220,4 +220,4 @@ These are the high-level aims that we have to work towards. This list is not a f | |||
220 | * Inventory of exiting kdepim: This will help to fill the functional blocks, and help in carving out the require featureset. | 220 | * Inventory of exiting kdepim: This will help to fill the functional blocks, and help in carving out the require featureset. |
221 | * Functional blocks: We need to identify the function blocks that we require, see to what extent they are already existing and how we can reuse what's there already. The functinal blocks should largely follow from the identified requirements. | 221 | * Functional blocks: We need to identify the function blocks that we require, see to what extent they are already existing and how we can reuse what's there already. The functinal blocks should largely follow from the identified requirements. |
222 | * Prototype the domain logic: We need to prototype the domain logic as envisioned to see wether that works out. This will be an ongoing process especially while working towards the first milestone. | 222 | * Prototype the domain logic: We need to prototype the domain logic as envisioned to see wether that works out. This will be an ongoing process especially while working towards the first milestone. |
223 | * Prototype with domain logic + akonadi next + trivial UI. Show that this can work in it's basics. | 223 | * Prototype with domain logic + Sink + trivial UI. Show that this can work in it's basics. |
diff --git a/framework/CMakeLists.txt b/framework/CMakeLists.txt index 0b2b505d..8b0a7ca1 100644 --- a/framework/CMakeLists.txt +++ b/framework/CMakeLists.txt | |||
@@ -18,7 +18,7 @@ find_package(Qt5 COMPONENTS REQUIRED Core Qml) | |||
18 | 18 | ||
19 | find_package(KF5Otp "5.1.42" CONFIG REQUIRED) | 19 | find_package(KF5Otp "5.1.42" CONFIG REQUIRED) |
20 | find_package(KF5Mime "4.87.0" CONFIG REQUIRED) | 20 | find_package(KF5Mime "4.87.0" CONFIG REQUIRED) |
21 | find_package(Akonadi2Common CONFIG REQUIRED) | 21 | find_package(SinkCommon CONFIG REQUIRED) |
22 | find_package(KF5Async) | 22 | find_package(KF5Async) |
23 | find_package(KF5Libkleo) | 23 | find_package(KF5Libkleo) |
24 | 24 | ||
@@ -35,7 +35,7 @@ include_directories(SYSTEM /work/install/include/KF5/KCoreAddons) | |||
35 | 35 | ||
36 | enable_testing() | 36 | enable_testing() |
37 | 37 | ||
38 | set(AKONADI2_RESOURCE_PLUGINS_PATH ${QT_PLUGIN_INSTALL_DIR}/akonadi2/resources) | 38 | set(SINK_RESOURCE_PLUGINS_PATH ${QT_PLUGIN_INSTALL_DIR}/sink/resources) |
39 | 39 | ||
40 | add_subdirectory(mail) | 40 | add_subdirectory(mail) |
41 | add_subdirectory(actions) | 41 | add_subdirectory(actions) |
diff --git a/framework/mail/CMakeLists.txt b/framework/mail/CMakeLists.txt index 9a32cc83..0a0e0ac6 100644 --- a/framework/mail/CMakeLists.txt +++ b/framework/mail/CMakeLists.txt | |||
@@ -5,7 +5,7 @@ set(mailplugin_SRCS | |||
5 | singlemailcontroller.cpp | 5 | singlemailcontroller.cpp |
6 | folderlistmodel.cpp | 6 | folderlistmodel.cpp |
7 | folderlistcontroller.cpp | 7 | folderlistcontroller.cpp |
8 | actions/akonadiactions.cpp | 8 | actions/sinkactions.cpp |
9 | objecttreesource.cpp | 9 | objecttreesource.cpp |
10 | stringhtmlwriter.cpp | 10 | stringhtmlwriter.cpp |
11 | ) | 11 | ) |
@@ -14,7 +14,7 @@ add_library(mailplugin SHARED ${mailplugin_SRCS}) | |||
14 | 14 | ||
15 | qt5_use_modules(mailplugin Core Quick Qml) | 15 | qt5_use_modules(mailplugin Core Quick Qml) |
16 | 16 | ||
17 | target_link_libraries(mailplugin actionplugin KF5::akonadi2common KF5::Otp actionplugin) | 17 | target_link_libraries(mailplugin actionplugin Sink KF5::Otp) |
18 | 18 | ||
19 | install(TARGETS mailplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/kube/mail) | 19 | install(TARGETS mailplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/kube/mail) |
20 | install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/kube/mail) | 20 | install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/kube/mail) |
diff --git a/framework/mail/actions/akonadiactions.cpp b/framework/mail/actions/sinkactions.cpp index d0a51deb..8918f996 100644 --- a/framework/mail/actions/akonadiactions.cpp +++ b/framework/mail/actions/sinkactions.cpp | |||
@@ -16,11 +16,11 @@ | |||
16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
17 | 02110-1301, USA. | 17 | 02110-1301, USA. |
18 | */ | 18 | */ |
19 | #include "akonadiactions.h" | 19 | #include "sinkactions.h" |
20 | 20 | ||
21 | #include <actions/context.h> | 21 | #include <actions/context.h> |
22 | 22 | ||
23 | #include <akonadi2common/clientapi.h> | 23 | #include <sinkcommon/clientapi.h> |
24 | 24 | ||
25 | using namespace Kube; | 25 | using namespace Kube; |
26 | 26 | ||
@@ -47,14 +47,14 @@ static ActionHandlerHelper markAsReadHandler("org.kde.kube.actions.mark-as-read" | |||
47 | return context->property("mail").isValid(); | 47 | return context->property("mail").isValid(); |
48 | }, | 48 | }, |
49 | [](Context *context) { | 49 | [](Context *context) { |
50 | auto mail = context->property("mail").value<Akonadi2::ApplicationDomain::Mail::Ptr>(); | 50 | auto mail = context->property("mail").value<Sink::ApplicationDomain::Mail::Ptr>(); |
51 | if (!mail) { | 51 | if (!mail) { |
52 | qWarning() << "Failed to get the mail mail: " << context->property("mail"); | 52 | qWarning() << "Failed to get the mail mail: " << context->property("mail"); |
53 | return; | 53 | return; |
54 | } | 54 | } |
55 | mail->setProperty("unread", false); | 55 | mail->setProperty("unread", false); |
56 | qDebug() << "Mark as read " << mail->identifier(); | 56 | qDebug() << "Mark as read " << mail->identifier(); |
57 | Akonadi2::Store::modify(*mail).exec(); | 57 | Sink::Store::modify(*mail).exec(); |
58 | } | 58 | } |
59 | ); | 59 | ); |
60 | 60 | ||
@@ -63,13 +63,13 @@ static ActionHandlerHelper deleteHandler("org.kde.kube.actions.delete", | |||
63 | return context->property("mail").isValid(); | 63 | return context->property("mail").isValid(); |
64 | }, | 64 | }, |
65 | [](Context *context) { | 65 | [](Context *context) { |
66 | auto mail = context->property("mail").value<Akonadi2::ApplicationDomain::Mail::Ptr>(); | 66 | auto mail = context->property("mail").value<Sink::ApplicationDomain::Mail::Ptr>(); |
67 | if (!mail) { | 67 | if (!mail) { |
68 | qWarning() << "Failed to get the mail mail: " << context->property("mail"); | 68 | qWarning() << "Failed to get the mail mail: " << context->property("mail"); |
69 | return; | 69 | return; |
70 | } | 70 | } |
71 | mail->setProperty("unread", false); | 71 | mail->setProperty("unread", false); |
72 | qDebug() << "Remove " << mail->identifier(); | 72 | qDebug() << "Remove " << mail->identifier(); |
73 | Akonadi2::Store::remove(*mail).exec(); | 73 | Sink::Store::remove(*mail).exec(); |
74 | } | 74 | } |
75 | ); | 75 | ); |
diff --git a/framework/mail/actions/akonadiactions.h b/framework/mail/actions/sinkactions.h index a583ebf8..a583ebf8 100644 --- a/framework/mail/actions/akonadiactions.h +++ b/framework/mail/actions/sinkactions.h | |||
diff --git a/framework/mail/folderlistcontroller.cpp b/framework/mail/folderlistcontroller.cpp index 3b1cf9f8..46a6f648 100644 --- a/framework/mail/folderlistcontroller.cpp +++ b/framework/mail/folderlistcontroller.cpp | |||
@@ -52,7 +52,7 @@ FolderListModel* FolderListController::model() const | |||
52 | 52 | ||
53 | void FolderListController::loadFolders(const QString &id) | 53 | void FolderListController::loadFolders(const QString &id) |
54 | { | 54 | { |
55 | //load foldermodel from akonadi | 55 | //load foldermodel from sink |
56 | 56 | ||
57 | } | 57 | } |
58 | 58 | ||
diff --git a/framework/mail/folderlistmodel.cpp b/framework/mail/folderlistmodel.cpp index 204dfdbf..645ecc30 100644 --- a/framework/mail/folderlistmodel.cpp +++ b/framework/mail/folderlistmodel.cpp | |||
@@ -19,17 +19,17 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include "folderlistmodel.h" | 21 | #include "folderlistmodel.h" |
22 | #include <akonadi2common/clientapi.h> | 22 | #include <sinkcommon/clientapi.h> |
23 | #include <akonadi2common/applicationdomaintype.h> | 23 | #include <sinkcommon/applicationdomaintype.h> |
24 | 24 | ||
25 | FolderListModel::FolderListModel(QObject *parent) : QIdentityProxyModel() | 25 | FolderListModel::FolderListModel(QObject *parent) : QIdentityProxyModel() |
26 | { | 26 | { |
27 | Akonadi2::Query query; | 27 | Sink::Query query; |
28 | query.syncOnDemand = false; | 28 | query.syncOnDemand = false; |
29 | query.processAll = false; | 29 | query.processAll = false; |
30 | query.liveQuery = true; | 30 | query.liveQuery = true; |
31 | query.requestedProperties << "name" << "icon"; | 31 | query.requestedProperties << "name" << "icon"; |
32 | mModel = Akonadi2::Store::loadModel<Akonadi2::ApplicationDomain::Folder>(query); | 32 | mModel = Sink::Store::loadModel<Sink::ApplicationDomain::Folder>(query); |
33 | setSourceModel(mModel.data()); | 33 | setSourceModel(mModel.data()); |
34 | } | 34 | } |
35 | 35 | ||
@@ -59,9 +59,9 @@ QVariant FolderListModel::data(const QModelIndex &idx, int role) const | |||
59 | case Icon: | 59 | case Icon: |
60 | return srcIdx.sibling(srcIdx.row(), 1).data(Qt::DisplayRole).toString(); | 60 | return srcIdx.sibling(srcIdx.row(), 1).data(Qt::DisplayRole).toString(); |
61 | case Id: | 61 | case Id: |
62 | return srcIdx.data(Akonadi2::Store::DomainObjectBaseRole).value<Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr>()->identifier(); | 62 | return srcIdx.data(Sink::Store::DomainObjectBaseRole).value<Sink::ApplicationDomain::ApplicationDomainType::Ptr>()->identifier(); |
63 | case DomainObject: | 63 | case DomainObject: |
64 | return srcIdx.data(Akonadi2::Store::DomainObjectRole); | 64 | return srcIdx.data(Sink::Store::DomainObjectRole); |
65 | } | 65 | } |
66 | return QIdentityProxyModel::data(idx, role); | 66 | return QIdentityProxyModel::data(idx, role); |
67 | } | 67 | } |
diff --git a/framework/mail/maillistcontroller.cpp b/framework/mail/maillistcontroller.cpp index ed353b70..b342b1ec 100644 --- a/framework/mail/maillistcontroller.cpp +++ b/framework/mail/maillistcontroller.cpp | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | #include <QStringList> | 23 | #include <QStringList> |
24 | 24 | ||
25 | #include <akonadi2common/clientapi.h> | 25 | #include <sinkcommon/clientapi.h> |
26 | 26 | ||
27 | #include "maillistmodel.h" | 27 | #include "maillistmodel.h" |
28 | 28 | ||
@@ -38,7 +38,7 @@ MailListModel *MailListController::model() const | |||
38 | 38 | ||
39 | void MailListController::loadAllMail() | 39 | void MailListController::loadAllMail() |
40 | { | 40 | { |
41 | Akonadi2::Query query; | 41 | Sink::Query query; |
42 | query.syncOnDemand = false; | 42 | query.syncOnDemand = false; |
43 | query.processAll = false; | 43 | query.processAll = false; |
44 | query.liveQuery = true; | 44 | query.liveQuery = true; |
@@ -48,7 +48,7 @@ void MailListController::loadAllMail() | |||
48 | 48 | ||
49 | void MailListController::loadMailFolder(const QString &folderId) | 49 | void MailListController::loadMailFolder(const QString &folderId) |
50 | { | 50 | { |
51 | Akonadi2::Query query; | 51 | Sink::Query query; |
52 | query.syncOnDemand = false; | 52 | query.syncOnDemand = false; |
53 | query.processAll = false; | 53 | query.processAll = false; |
54 | query.liveQuery = true; | 54 | query.liveQuery = true; |
@@ -59,7 +59,7 @@ void MailListController::loadMailFolder(const QString &folderId) | |||
59 | 59 | ||
60 | void MailListController::loadUnreadMail() | 60 | void MailListController::loadUnreadMail() |
61 | { | 61 | { |
62 | Akonadi2::Query query; | 62 | Sink::Query query; |
63 | query.syncOnDemand = false; | 63 | query.syncOnDemand = false; |
64 | query.processAll = false; | 64 | query.processAll = false; |
65 | query.liveQuery = true; | 65 | query.liveQuery = true; |
@@ -70,7 +70,7 @@ void MailListController::loadUnreadMail() | |||
70 | 70 | ||
71 | void MailListController::loadImportantMail() | 71 | void MailListController::loadImportantMail() |
72 | { | 72 | { |
73 | Akonadi2::Query query; | 73 | Sink::Query query; |
74 | query.syncOnDemand = false; | 74 | query.syncOnDemand = false; |
75 | query.processAll = false; | 75 | query.processAll = false; |
76 | query.liveQuery = true; | 76 | query.liveQuery = true; |
diff --git a/framework/mail/maillistmodel.cpp b/framework/mail/maillistmodel.cpp index 2314e155..e43351b0 100644 --- a/framework/mail/maillistmodel.cpp +++ b/framework/mail/maillistmodel.cpp | |||
@@ -74,9 +74,9 @@ QVariant MailListModel::data(const QModelIndex &idx, int role) const | |||
74 | case Important: | 74 | case Important: |
75 | return srcIdx.sibling(srcIdx.row(), 5).data(Qt::DisplayRole).toString(); | 75 | return srcIdx.sibling(srcIdx.row(), 5).data(Qt::DisplayRole).toString(); |
76 | case Id: | 76 | case Id: |
77 | return srcIdx.data(Akonadi2::Store::DomainObjectBaseRole).value<Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr>()->identifier(); | 77 | return srcIdx.data(Sink::Store::DomainObjectBaseRole).value<Sink::ApplicationDomain::ApplicationDomainType::Ptr>()->identifier(); |
78 | case DomainObject: | 78 | case DomainObject: |
79 | return srcIdx.data(Akonadi2::Store::DomainObjectRole); | 79 | return srcIdx.data(Sink::Store::DomainObjectRole); |
80 | case MimeMessage: { | 80 | case MimeMessage: { |
81 | auto filename = srcIdx.sibling(srcIdx.row(), 6).data(Qt::DisplayRole).toString(); | 81 | auto filename = srcIdx.sibling(srcIdx.row(), 6).data(Qt::DisplayRole).toString(); |
82 | QFile file(filename); | 82 | QFile file(filename); |
@@ -123,20 +123,20 @@ QVariant MailListModel::data(const QModelIndex &idx, int role) const | |||
123 | return QIdentityProxyModel::data(idx, role); | 123 | return QIdentityProxyModel::data(idx, role); |
124 | } | 124 | } |
125 | 125 | ||
126 | void MailListModel::runQuery(const Akonadi2::Query &query) | 126 | void MailListModel::runQuery(const Sink::Query &query) |
127 | { | 127 | { |
128 | m_model = Akonadi2::Store::loadModel<Akonadi2::ApplicationDomain::Mail>(query); | 128 | m_model = Sink::Store::loadModel<Sink::ApplicationDomain::Mail>(query); |
129 | setSourceModel(m_model.data()); | 129 | setSourceModel(m_model.data()); |
130 | } | 130 | } |
131 | 131 | ||
132 | void MailListModel::setParentFolder(const QVariant &parentFolder) | 132 | void MailListModel::setParentFolder(const QVariant &parentFolder) |
133 | { | 133 | { |
134 | auto folder = parentFolder.value<Akonadi2::ApplicationDomain::Folder::Ptr>(); | 134 | auto folder = parentFolder.value<Sink::ApplicationDomain::Folder::Ptr>(); |
135 | if (!folder) { | 135 | if (!folder) { |
136 | qWarning() << "No folder: " << parentFolder; | 136 | qWarning() << "No folder: " << parentFolder; |
137 | return; | 137 | return; |
138 | } | 138 | } |
139 | Akonadi2::Query query; | 139 | Sink::Query query; |
140 | query.syncOnDemand = false; | 140 | query.syncOnDemand = false; |
141 | query.processAll = false; | 141 | query.processAll = false; |
142 | query.liveQuery = true; | 142 | query.liveQuery = true; |
@@ -154,12 +154,12 @@ QVariant MailListModel::parentFolder() const | |||
154 | 154 | ||
155 | void MailListModel::setMail(const QVariant &variant) | 155 | void MailListModel::setMail(const QVariant &variant) |
156 | { | 156 | { |
157 | auto mail = variant.value<Akonadi2::ApplicationDomain::Mail::Ptr>(); | 157 | auto mail = variant.value<Sink::ApplicationDomain::Mail::Ptr>(); |
158 | if (!mail) { | 158 | if (!mail) { |
159 | qWarning() << "No mail: " << mail; | 159 | qWarning() << "No mail: " << mail; |
160 | return; | 160 | return; |
161 | } | 161 | } |
162 | Akonadi2::Query query; | 162 | Sink::Query query; |
163 | query.syncOnDemand = false; | 163 | query.syncOnDemand = false; |
164 | query.processAll = false; | 164 | query.processAll = false; |
165 | query.liveQuery = false; | 165 | query.liveQuery = false; |
diff --git a/framework/mail/maillistmodel.h b/framework/mail/maillistmodel.h index 1d56e6b8..6593a59c 100644 --- a/framework/mail/maillistmodel.h +++ b/framework/mail/maillistmodel.h | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | #pragma once | 21 | #pragma once |
22 | 22 | ||
23 | #include <akonadi2common/clientapi.h> | 23 | #include <sinkcommon/clientapi.h> |
24 | 24 | ||
25 | #include <QIdentityProxyModel> | 25 | #include <QIdentityProxyModel> |
26 | #include <QSharedPointer> | 26 | #include <QSharedPointer> |
@@ -53,7 +53,7 @@ public: | |||
53 | 53 | ||
54 | QHash<int, QByteArray> roleNames() const; | 54 | QHash<int, QByteArray> roleNames() const; |
55 | 55 | ||
56 | void runQuery(const Akonadi2::Query &query); | 56 | void runQuery(const Sink::Query &query); |
57 | 57 | ||
58 | void setParentFolder(const QVariant &parentFolder); | 58 | void setParentFolder(const QVariant &parentFolder); |
59 | QVariant parentFolder() const; | 59 | QVariant parentFolder() const; |
diff --git a/framework/mail/singlemailcontroller.cpp b/framework/mail/singlemailcontroller.cpp index 5f7a6d93..d0ab9f3c 100644 --- a/framework/mail/singlemailcontroller.cpp +++ b/framework/mail/singlemailcontroller.cpp | |||
@@ -38,7 +38,7 @@ MailListModel* SingleMailController::model() const | |||
38 | 38 | ||
39 | void SingleMailController::loadMail(const QString &id) | 39 | void SingleMailController::loadMail(const QString &id) |
40 | { | 40 | { |
41 | Akonadi2::Query query; | 41 | Sink::Query query; |
42 | query.syncOnDemand = false; | 42 | query.syncOnDemand = false; |
43 | query.processAll = false; | 43 | query.processAll = false; |
44 | query.liveQuery = false; | 44 | query.liveQuery = false; |
diff --git a/framework/settings/CMakeLists.txt b/framework/settings/CMakeLists.txt index 5d61851f..017820b6 100644 --- a/framework/settings/CMakeLists.txt +++ b/framework/settings/CMakeLists.txt | |||
@@ -9,7 +9,7 @@ add_library(settingsplugin SHARED ${settingsplugin_SRCS}) | |||
9 | 9 | ||
10 | qt5_use_modules(settingsplugin Core Quick Qml) | 10 | qt5_use_modules(settingsplugin Core Quick Qml) |
11 | 11 | ||
12 | target_link_libraries(settingsplugin KF5::akonadi2common) | 12 | target_link_libraries(settingsplugin KF5::sinkcommon) |
13 | 13 | ||
14 | install(TARGETS settingsplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/akonadi2/settings) | 14 | install(TARGETS settingsplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/sink/settings) |
15 | install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/akonadi2/settings) \ No newline at end of file | 15 | install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/sink/settings) \ No newline at end of file |
diff --git a/framework/settings/qmldir b/framework/settings/qmldir index 4db161bc..1740f29a 100644 --- a/framework/settings/qmldir +++ b/framework/settings/qmldir | |||
@@ -1,3 +1,3 @@ | |||
1 | module org.kde.akonadi2.settings | 1 | module org.kde.sink.settings |
2 | 2 | ||
3 | plugin settingsplugin \ No newline at end of file | 3 | plugin settingsplugin |
diff --git a/framework/settings/resourcelistmodel.cpp b/framework/settings/resourcelistmodel.cpp index ebeaac32..ae1ffc15 100644 --- a/framework/settings/resourcelistmodel.cpp +++ b/framework/settings/resourcelistmodel.cpp | |||
@@ -1,15 +1,15 @@ | |||
1 | #include "resourcelistmodel.h" | 1 | #include "resourcelistmodel.h" |
2 | 2 | ||
3 | #include <akonadi2common/clientapi.h> | 3 | #include <sinkcommon/clientapi.h> |
4 | 4 | ||
5 | ResourceListModel::ResourceListModel(QObject *parent) : QIdentityProxyModel() | 5 | ResourceListModel::ResourceListModel(QObject *parent) : QIdentityProxyModel() |
6 | { | 6 | { |
7 | Akonadi2::Query query; | 7 | Sink::Query query; |
8 | query.syncOnDemand = false; | 8 | query.syncOnDemand = false; |
9 | query.processAll = false; | 9 | query.processAll = false; |
10 | query.liveQuery = true; | 10 | query.liveQuery = true; |
11 | query.requestedProperties << "type"; | 11 | query.requestedProperties << "type"; |
12 | m_model = Akonadi2::Store::loadModel<Akonadi2::ApplicationDomain::AkonadiResource>(query); | 12 | m_model = Sink::Store::loadModel<Sink::ApplicationDomain::SinkResource>(query); |
13 | } | 13 | } |
14 | 14 | ||
15 | ResourceListModel::~ResourceListModel() | 15 | ResourceListModel::~ResourceListModel() |
@@ -32,7 +32,7 @@ QVariant ResourceListModel::data(const QModelIndex& index, int role) const | |||
32 | auto srcIdx = mapToSource(index); | 32 | auto srcIdx = mapToSource(index); |
33 | switch (role) { | 33 | switch (role) { |
34 | case Id: | 34 | case Id: |
35 | return srcIdx.data(Akonadi2::Store::DomainObjectBaseRole).value<Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr>()->identifier(); | 35 | return srcIdx.data(Sink::Store::DomainObjectBaseRole).value<Sink::ApplicationDomain::ApplicationDomainType::Ptr>()->identifier(); |
36 | case Type: | 36 | case Type: |
37 | return srcIdx.sibling(srcIdx.row(), 0).data(Qt::DisplayRole).toString(); | 37 | return srcIdx.sibling(srcIdx.row(), 0).data(Qt::DisplayRole).toString(); |
38 | } | 38 | } |
diff --git a/framework/settings/settingsplugin.cpp b/framework/settings/settingsplugin.cpp index 6c2951e7..ca670583 100644 --- a/framework/settings/settingsplugin.cpp +++ b/framework/settings/settingsplugin.cpp | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | void SettingsPlugin::registerTypes (const char *uri) | 9 | void SettingsPlugin::registerTypes (const char *uri) |
10 | { | 10 | { |
11 | Q_ASSERT(uri == QLatin1String("org.kde.akonadi2.settings")); | 11 | Q_ASSERT(uri == QLatin1String("org.kde.sink.settings")); |
12 | 12 | ||
13 | qmlRegisterType<ResourceListModel>(); | 13 | qmlRegisterType<ResourceListModel>(); |
14 | qmlRegisterType<ResourcesController>(uri, 1, 0, "Resources"); | 14 | qmlRegisterType<ResourcesController>(uri, 1, 0, "Resources"); |