From 42d34555397dd62399233fac1fbfa216c255ef68 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 21 Jan 2016 11:46:46 +0100 Subject: Akonadi2 -> Sink --- README.md | 2 +- applications/kube-accounts/Maildir.qml | 2 +- applications/kube-mail-mobile/main.qml | 2 +- .../kube-mail/package/contents/ui/example.qml | 2 +- docs/design.md | 14 ++-- docs/requirements.md | 4 +- framework/CMakeLists.txt | 4 +- framework/mail/CMakeLists.txt | 4 +- framework/mail/actions/akonadiactions.cpp | 75 ---------------------- framework/mail/actions/akonadiactions.h | 40 ------------ framework/mail/actions/sinkactions.cpp | 75 ++++++++++++++++++++++ framework/mail/actions/sinkactions.h | 40 ++++++++++++ framework/mail/folderlistcontroller.cpp | 2 +- framework/mail/folderlistmodel.cpp | 12 ++-- framework/mail/maillistcontroller.cpp | 10 +-- framework/mail/maillistmodel.cpp | 16 ++--- framework/mail/maillistmodel.h | 4 +- framework/mail/singlemailcontroller.cpp | 2 +- framework/settings/CMakeLists.txt | 6 +- framework/settings/qmldir | 4 +- framework/settings/resourcelistmodel.cpp | 8 +-- framework/settings/settingsplugin.cpp | 2 +- 22 files changed, 165 insertions(+), 165 deletions(-) delete mode 100644 framework/mail/actions/akonadiactions.cpp delete mode 100644 framework/mail/actions/akonadiactions.h create mode 100644 framework/mail/actions/sinkactions.cpp create mode 100644 framework/mail/actions/sinkactions.h diff --git a/README.md b/README.md index 9bc81d09..a67ac766 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## Kube Kube is a personal information and collaboration application currently in its early -stages of development. It uses Akonadi Next for data access and synchronization, and +stages of development. It uses Sink for data access and synchronization, and leverages the KDE PIM codebase where possible. 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 import QtQuick.Layouts 1.1 import QtQuick.Dialogs 1.0 -import org.kde.akonadi2.settings 1.0 as Settings +import org.kde.sink.settings 1.0 as Settings Item { 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 { anchors.fill: parent - //TODO set akonadi folderId property + //TODO set sink folderId property initialItem: {"item": Qt.resolvedUrl("FolderListView.qml"),properties: {stack: stack}} } 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 import QtQuick.Controls 1.3 import QtQuick.Layouts 1.1 -import org.kde.akonadi2.mail 1.0 +import org.kde.sink.mail 1.0 Item { 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 | | +--------------+------+------+ | | | | -| Akonadi Next |Config| ... | +| Sink |Config| ... | | | | | +--------------+------+------+ ``` @@ -28,7 +28,7 @@ The domain logic layer holds the application state. It povides models to access The infrastructure layer provides: -* Data access (Akonadi Next) +* Data access (Sink) * Configuration (Config files, etc.) * Various functionality provided by libraries (email sending, ldap, iTip handling, iCal implementation (kcalcore), vCard implementation, ...) 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 ## Third party users of components Since components are self contained and made available throuh the KPackage sytem, external applications can load fully functional Kube components. -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). +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). ## Domain Logic @@ -123,10 +123,10 @@ Notifications can be displayed in various places of the application. The infrastructure layer interfaces with the rest of the system. It is the place where we can integrate with various native infrastructure parts. 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. -### Akonadi Next -Akonadi Next is used for primary data access and handles all synchronization. +### Sink +Sink is used for primary data access and handles all synchronization. -Interactions with Akonadi Next involve: +Interactions with Sink involve: * Adding/removing/configuring resources * Triggering synchronization @@ -223,7 +223,7 @@ KubeComponents.MailView { * Move/Copy/Delete folder * Synchronize folder * Folder List Model - * Mixes akonadi next queries and subqueries (folder list with smart folders) + * Mixes Sink queries and subqueries (folder list with smart folders) * name * statistics 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: ## Requirements * Each module has at least rudimentary tests that can then be extended * Tests need to be deterministic, no random timeouts to check if something already happened, only `QTRY_VERIFY` and alike is allowed. -* Clear layering. No depending on akonadi from everywhere. +* Clear layering. No depending on Sink from everywhere. * Each module comes with a clear set of justified dependencies. * Commented code is only allowed in conjunction with a task in phabricator. No dead/commented code. * 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 * Inventory of exiting kdepim: This will help to fill the functional blocks, and help in carving out the require featureset. * 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. * 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. - * Prototype with domain logic + akonadi next + trivial UI. Show that this can work in it's basics. + * 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) find_package(KF5Otp "5.1.42" CONFIG REQUIRED) find_package(KF5Mime "4.87.0" CONFIG REQUIRED) -find_package(Akonadi2Common CONFIG REQUIRED) +find_package(SinkCommon CONFIG REQUIRED) find_package(KF5Async) find_package(KF5Libkleo) @@ -35,7 +35,7 @@ include_directories(SYSTEM /work/install/include/KF5/KCoreAddons) enable_testing() -set(AKONADI2_RESOURCE_PLUGINS_PATH ${QT_PLUGIN_INSTALL_DIR}/akonadi2/resources) +set(SINK_RESOURCE_PLUGINS_PATH ${QT_PLUGIN_INSTALL_DIR}/sink/resources) add_subdirectory(mail) 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 singlemailcontroller.cpp folderlistmodel.cpp folderlistcontroller.cpp - actions/akonadiactions.cpp + actions/sinkactions.cpp objecttreesource.cpp stringhtmlwriter.cpp ) @@ -14,7 +14,7 @@ add_library(mailplugin SHARED ${mailplugin_SRCS}) qt5_use_modules(mailplugin Core Quick Qml) -target_link_libraries(mailplugin actionplugin KF5::akonadi2common KF5::Otp actionplugin) +target_link_libraries(mailplugin actionplugin Sink KF5::Otp) install(TARGETS mailplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/kube/mail) install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/kube/mail) diff --git a/framework/mail/actions/akonadiactions.cpp b/framework/mail/actions/akonadiactions.cpp deleted file mode 100644 index d0a51deb..00000000 --- a/framework/mail/actions/akonadiactions.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - Copyright (c) 2016 Christian Mollekopf - - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published by - the Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - This library is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public - License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. -*/ -#include "akonadiactions.h" - -#include - -#include - -using namespace Kube; - -ActionHandlerHelper::ActionHandlerHelper(const QByteArray &actionId, const std::function &isReady, const std::function &handler) - : ActionHandler(nullptr), - isReadyFunction(isReady), - handlerFunction(handler) -{ - setActionId(actionId); -} - -bool ActionHandlerHelper::isActionReady(Context *context) -{ - return isReadyFunction(context); -} - -void ActionHandlerHelper::execute(Context *context) -{ - handlerFunction(context); -} - -static ActionHandlerHelper markAsReadHandler("org.kde.kube.actions.mark-as-read", - [](Context *context) -> bool { - return context->property("mail").isValid(); - }, - [](Context *context) { - auto mail = context->property("mail").value(); - if (!mail) { - qWarning() << "Failed to get the mail mail: " << context->property("mail"); - return; - } - mail->setProperty("unread", false); - qDebug() << "Mark as read " << mail->identifier(); - Akonadi2::Store::modify(*mail).exec(); - } -); - -static ActionHandlerHelper deleteHandler("org.kde.kube.actions.delete", - [](Context *context) -> bool { - return context->property("mail").isValid(); - }, - [](Context *context) { - auto mail = context->property("mail").value(); - if (!mail) { - qWarning() << "Failed to get the mail mail: " << context->property("mail"); - return; - } - mail->setProperty("unread", false); - qDebug() << "Remove " << mail->identifier(); - Akonadi2::Store::remove(*mail).exec(); - } -); diff --git a/framework/mail/actions/akonadiactions.h b/framework/mail/actions/akonadiactions.h deleted file mode 100644 index a583ebf8..00000000 --- a/framework/mail/actions/akonadiactions.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (c) 2016 Christian Mollekopf - - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published by - the Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - This library is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public - License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. -*/ -#pragma once - -#include -#include - -namespace Kube { -class Context; - -class ActionHandlerHelper : public ActionHandler -{ - Q_OBJECT -public: - ActionHandlerHelper(const QByteArray &actionId, const std::function &, const std::function &); - - bool isActionReady(Context *context) Q_DECL_OVERRIDE; - void execute(Context *context) Q_DECL_OVERRIDE; -private: - const std::function isReadyFunction; - const std::function handlerFunction; -}; - -} diff --git a/framework/mail/actions/sinkactions.cpp b/framework/mail/actions/sinkactions.cpp new file mode 100644 index 00000000..8918f996 --- /dev/null +++ b/framework/mail/actions/sinkactions.cpp @@ -0,0 +1,75 @@ +/* + Copyright (c) 2016 Christian Mollekopf + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public + License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. +*/ +#include "sinkactions.h" + +#include + +#include + +using namespace Kube; + +ActionHandlerHelper::ActionHandlerHelper(const QByteArray &actionId, const std::function &isReady, const std::function &handler) + : ActionHandler(nullptr), + isReadyFunction(isReady), + handlerFunction(handler) +{ + setActionId(actionId); +} + +bool ActionHandlerHelper::isActionReady(Context *context) +{ + return isReadyFunction(context); +} + +void ActionHandlerHelper::execute(Context *context) +{ + handlerFunction(context); +} + +static ActionHandlerHelper markAsReadHandler("org.kde.kube.actions.mark-as-read", + [](Context *context) -> bool { + return context->property("mail").isValid(); + }, + [](Context *context) { + auto mail = context->property("mail").value(); + if (!mail) { + qWarning() << "Failed to get the mail mail: " << context->property("mail"); + return; + } + mail->setProperty("unread", false); + qDebug() << "Mark as read " << mail->identifier(); + Sink::Store::modify(*mail).exec(); + } +); + +static ActionHandlerHelper deleteHandler("org.kde.kube.actions.delete", + [](Context *context) -> bool { + return context->property("mail").isValid(); + }, + [](Context *context) { + auto mail = context->property("mail").value(); + if (!mail) { + qWarning() << "Failed to get the mail mail: " << context->property("mail"); + return; + } + mail->setProperty("unread", false); + qDebug() << "Remove " << mail->identifier(); + Sink::Store::remove(*mail).exec(); + } +); diff --git a/framework/mail/actions/sinkactions.h b/framework/mail/actions/sinkactions.h new file mode 100644 index 00000000..a583ebf8 --- /dev/null +++ b/framework/mail/actions/sinkactions.h @@ -0,0 +1,40 @@ +/* + Copyright (c) 2016 Christian Mollekopf + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public + License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. +*/ +#pragma once + +#include +#include + +namespace Kube { +class Context; + +class ActionHandlerHelper : public ActionHandler +{ + Q_OBJECT +public: + ActionHandlerHelper(const QByteArray &actionId, const std::function &, const std::function &); + + bool isActionReady(Context *context) Q_DECL_OVERRIDE; + void execute(Context *context) Q_DECL_OVERRIDE; +private: + const std::function isReadyFunction; + const std::function handlerFunction; +}; + +} 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 void FolderListController::loadFolders(const QString &id) { - //load foldermodel from akonadi + //load foldermodel from sink } 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 @@ */ #include "folderlistmodel.h" -#include -#include +#include +#include FolderListModel::FolderListModel(QObject *parent) : QIdentityProxyModel() { - Akonadi2::Query query; + Sink::Query query; query.syncOnDemand = false; query.processAll = false; query.liveQuery = true; query.requestedProperties << "name" << "icon"; - mModel = Akonadi2::Store::loadModel(query); + mModel = Sink::Store::loadModel(query); setSourceModel(mModel.data()); } @@ -59,9 +59,9 @@ QVariant FolderListModel::data(const QModelIndex &idx, int role) const case Icon: return srcIdx.sibling(srcIdx.row(), 1).data(Qt::DisplayRole).toString(); case Id: - return srcIdx.data(Akonadi2::Store::DomainObjectBaseRole).value()->identifier(); + return srcIdx.data(Sink::Store::DomainObjectBaseRole).value()->identifier(); case DomainObject: - return srcIdx.data(Akonadi2::Store::DomainObjectRole); + return srcIdx.data(Sink::Store::DomainObjectRole); } return QIdentityProxyModel::data(idx, role); } 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 @@ #include -#include +#include #include "maillistmodel.h" @@ -38,7 +38,7 @@ MailListModel *MailListController::model() const void MailListController::loadAllMail() { - Akonadi2::Query query; + Sink::Query query; query.syncOnDemand = false; query.processAll = false; query.liveQuery = true; @@ -48,7 +48,7 @@ void MailListController::loadAllMail() void MailListController::loadMailFolder(const QString &folderId) { - Akonadi2::Query query; + Sink::Query query; query.syncOnDemand = false; query.processAll = false; query.liveQuery = true; @@ -59,7 +59,7 @@ void MailListController::loadMailFolder(const QString &folderId) void MailListController::loadUnreadMail() { - Akonadi2::Query query; + Sink::Query query; query.syncOnDemand = false; query.processAll = false; query.liveQuery = true; @@ -70,7 +70,7 @@ void MailListController::loadUnreadMail() void MailListController::loadImportantMail() { - Akonadi2::Query query; + Sink::Query query; query.syncOnDemand = false; query.processAll = false; 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 case Important: return srcIdx.sibling(srcIdx.row(), 5).data(Qt::DisplayRole).toString(); case Id: - return srcIdx.data(Akonadi2::Store::DomainObjectBaseRole).value()->identifier(); + return srcIdx.data(Sink::Store::DomainObjectBaseRole).value()->identifier(); case DomainObject: - return srcIdx.data(Akonadi2::Store::DomainObjectRole); + return srcIdx.data(Sink::Store::DomainObjectRole); case MimeMessage: { auto filename = srcIdx.sibling(srcIdx.row(), 6).data(Qt::DisplayRole).toString(); QFile file(filename); @@ -123,20 +123,20 @@ QVariant MailListModel::data(const QModelIndex &idx, int role) const return QIdentityProxyModel::data(idx, role); } -void MailListModel::runQuery(const Akonadi2::Query &query) +void MailListModel::runQuery(const Sink::Query &query) { - m_model = Akonadi2::Store::loadModel(query); + m_model = Sink::Store::loadModel(query); setSourceModel(m_model.data()); } void MailListModel::setParentFolder(const QVariant &parentFolder) { - auto folder = parentFolder.value(); + auto folder = parentFolder.value(); if (!folder) { qWarning() << "No folder: " << parentFolder; return; } - Akonadi2::Query query; + Sink::Query query; query.syncOnDemand = false; query.processAll = false; query.liveQuery = true; @@ -154,12 +154,12 @@ QVariant MailListModel::parentFolder() const void MailListModel::setMail(const QVariant &variant) { - auto mail = variant.value(); + auto mail = variant.value(); if (!mail) { qWarning() << "No mail: " << mail; return; } - Akonadi2::Query query; + Sink::Query query; query.syncOnDemand = false; query.processAll = false; 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 @@ #pragma once -#include +#include #include #include @@ -53,7 +53,7 @@ public: QHash roleNames() const; - void runQuery(const Akonadi2::Query &query); + void runQuery(const Sink::Query &query); void setParentFolder(const QVariant &parentFolder); 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 void SingleMailController::loadMail(const QString &id) { - Akonadi2::Query query; + Sink::Query query; query.syncOnDemand = false; query.processAll = false; 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}) qt5_use_modules(settingsplugin Core Quick Qml) -target_link_libraries(settingsplugin KF5::akonadi2common) +target_link_libraries(settingsplugin KF5::sinkcommon) -install(TARGETS settingsplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/akonadi2/settings) -install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/akonadi2/settings) \ No newline at end of file +install(TARGETS settingsplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/sink/settings) +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 @@ -module org.kde.akonadi2.settings +module org.kde.sink.settings -plugin settingsplugin \ No newline at end of file +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 @@ #include "resourcelistmodel.h" -#include +#include ResourceListModel::ResourceListModel(QObject *parent) : QIdentityProxyModel() { - Akonadi2::Query query; + Sink::Query query; query.syncOnDemand = false; query.processAll = false; query.liveQuery = true; query.requestedProperties << "type"; - m_model = Akonadi2::Store::loadModel(query); + m_model = Sink::Store::loadModel(query); } ResourceListModel::~ResourceListModel() @@ -32,7 +32,7 @@ QVariant ResourceListModel::data(const QModelIndex& index, int role) const auto srcIdx = mapToSource(index); switch (role) { case Id: - return srcIdx.data(Akonadi2::Store::DomainObjectBaseRole).value()->identifier(); + return srcIdx.data(Sink::Store::DomainObjectBaseRole).value()->identifier(); case Type: return srcIdx.sibling(srcIdx.row(), 0).data(Qt::DisplayRole).toString(); } 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 @@ void SettingsPlugin::registerTypes (const char *uri) { - Q_ASSERT(uri == QLatin1String("org.kde.akonadi2.settings")); + Q_ASSERT(uri == QLatin1String("org.kde.sink.settings")); qmlRegisterType(); qmlRegisterType(uri, 1, 0, "Resources"); -- cgit v1.2.3