[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/pim/akonadi/exchangews/calendar
From: Roman Jarosz <kedgedev () gmail ! com>
Date: 2013-01-23 21:03:04
Message-ID: 20130123210304.C2EC8AC86C () svn ! kde ! org
[Download RAW message or body]
SVN commit 1334698 by rjarosz:
Allow ics import
M +13 -1 excalresource.cpp
--- trunk/playground/pim/akonadi/exchangews/calendar/excalresource.cpp \
#1334697:1334698 @@ -34,6 +34,8 @@
#include <kcalutils/stringify.h>
#include <KCalCore/Event>
+#include <KCalCore/Journal>
+#include <KCalCore/FreeBusy>
#include <excalresource.h>
#include <esoap.h>
@@ -59,6 +61,7 @@
ResourceBase(id), mItemMimeType("text/calendar"), mSubscription(0), \
mGetEvents(0), mInitialRequestsCount(0) {
qWarning("ExCalResource::create");
+
new SettingsAdaptor(Settings::self());
QDBusConnection::sessionBus().registerObject(QLatin1String("/Settings"), \
Settings::self(), QDBusConnection::ExportAdaptors);
@@ -164,7 +167,7 @@
Collection root;
root.setName(Settings::self()->name());
QStringList contentTypes;
- contentTypes << mItemMimeType << Akonadi::Collection::mimeType();
+ contentTypes << mItemMimeType << Akonadi::Collection::mimeType() << \
KCalCore::Event::eventMimeType(); root.setParentCollection(Collection::root());
root.setContentMimeTypes(contentTypes);
@@ -174,6 +177,7 @@
cachePolicy.setCacheTimeout(-1);
cachePolicy.setIntervalCheckTime(-1);
root.setCachePolicy(cachePolicy);
+ root.setRights( Collection::AllRights );
foreach (const EGetFolder::FolderItem& fItem, folders) {
if (fItem.type == EGetFolder::FolderItem::CalendarFolder) {
@@ -210,6 +214,14 @@
c.setRemoteId(fItem.id);
c.setRemoteRevision(fItem.changeKey);
c.setName(fItem.displayName);
+
+ Collection::Rights rights;
+ rights |= Collection::CanChangeItem;
+ rights |= Collection::CanCreateItem;
+ rights |= Collection::CanDeleteItem;
+ rights |= Collection::CanChangeCollection;
+ c.setRights(rights);
+
collections.append(c);
}
emit status(Running, i18n("fetched collections: %1").arg(collections.size()));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic