summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/domain/applicationdomaintype.cpp1
-rw-r--r--common/domain/applicationdomaintype.h1
-rw-r--r--common/domain/calendar.fbs1
-rw-r--r--common/domain/typeimplementations.cpp1
-rw-r--r--examples/caldavresource/CMakeLists.txt2
-rw-r--r--examples/caldavresource/caldavresource.cpp2
6 files changed, 7 insertions, 1 deletions
diff --git a/common/domain/applicationdomaintype.cpp b/common/domain/applicationdomaintype.cpp
index 9bc3d08..97bf9f2 100644
--- a/common/domain/applicationdomaintype.cpp
+++ b/common/domain/applicationdomaintype.cpp
@@ -163,6 +163,7 @@ SINK_REGISTER_PROPERTY(Todo, Calendar);
163 163
164SINK_REGISTER_ENTITY(Calendar); 164SINK_REGISTER_ENTITY(Calendar);
165SINK_REGISTER_PROPERTY(Calendar, Name); 165SINK_REGISTER_PROPERTY(Calendar, Name);
166SINK_REGISTER_PROPERTY(Calendar, Color);
166 167
167static const int foo = [] { 168static const int foo = [] {
168 QMetaType::registerEqualsComparator<Reference>(); 169 QMetaType::registerEqualsComparator<Reference>();
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h
index 802efd8..7f214ba 100644
--- a/common/domain/applicationdomaintype.h
+++ b/common/domain/applicationdomaintype.h
@@ -394,6 +394,7 @@ SINK_EXPORT QDebug operator<< (QDebug d, const Contact::Email &);
394struct SINK_EXPORT Calendar : public Entity { 394struct SINK_EXPORT Calendar : public Entity {
395 SINK_ENTITY(Calendar, calendar); 395 SINK_ENTITY(Calendar, calendar);
396 SINK_PROPERTY(QString, Name, name); 396 SINK_PROPERTY(QString, Name, name);
397 SINK_PROPERTY(QByteArray, Color, color);
397}; 398};
398 399
399struct SINK_EXPORT Event : public Entity { 400struct SINK_EXPORT Event : public Entity {
diff --git a/common/domain/calendar.fbs b/common/domain/calendar.fbs
index 9788539..375b9fb 100644
--- a/common/domain/calendar.fbs
+++ b/common/domain/calendar.fbs
@@ -2,6 +2,7 @@ namespace Sink.ApplicationDomain.Buffer;
2 2
3table Calendar { 3table Calendar {
4 name:string; 4 name:string;
5 color:string;
5} 6}
6 7
7root_type Calendar; 8root_type Calendar;
diff --git a/common/domain/typeimplementations.cpp b/common/domain/typeimplementations.cpp
index 2b2d2ac..bb3f455 100644
--- a/common/domain/typeimplementations.cpp
+++ b/common/domain/typeimplementations.cpp
@@ -269,6 +269,7 @@ QMap<QByteArray, int> TypeImplementation<Calendar>::typeDatabases()
269void TypeImplementation<Calendar>::configure(PropertyMapper &propertyMapper) 269void TypeImplementation<Calendar>::configure(PropertyMapper &propertyMapper)
270{ 270{
271 SINK_REGISTER_SERIALIZER(propertyMapper, Calendar, Name, name); 271 SINK_REGISTER_SERIALIZER(propertyMapper, Calendar, Name, name);
272 SINK_REGISTER_SERIALIZER(propertyMapper, Calendar, Color, color);
272} 273}
273 274
274void TypeImplementation<Calendar>::configure(IndexPropertyMapper &) {} 275void TypeImplementation<Calendar>::configure(IndexPropertyMapper &) {}
diff --git a/examples/caldavresource/CMakeLists.txt b/examples/caldavresource/CMakeLists.txt
index d2859aa..d6e8408 100644
--- a/examples/caldavresource/CMakeLists.txt
+++ b/examples/caldavresource/CMakeLists.txt
@@ -6,7 +6,7 @@ find_package(KPimKDAV2 REQUIRED)
6find_package(KF5CalendarCore REQUIRED) 6find_package(KF5CalendarCore REQUIRED)
7 7
8add_library(${PROJECT_NAME} SHARED caldavresource.cpp) 8add_library(${PROJECT_NAME} SHARED caldavresource.cpp)
9target_link_libraries(${PROJECT_NAME} sink_webdav_common sink Qt5::Core Qt5::Network KPim::KDAV2 9target_link_libraries(${PROJECT_NAME} sink_webdav_common sink Qt5::Core Qt5::Gui Qt5::Network KPim::KDAV2
10 KF5::CalendarCore) 10 KF5::CalendarCore)
11 11
12install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${SINK_RESOURCE_PLUGINS_PATH} RUNTIME DESTINATION ${SINK_RESOURCE_PLUGINS_PATH}) 12install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${SINK_RESOURCE_PLUGINS_PATH} RUNTIME DESTINATION ${SINK_RESOURCE_PLUGINS_PATH})
diff --git a/examples/caldavresource/caldavresource.cpp b/examples/caldavresource/caldavresource.cpp
index 8574575..df9ab52 100644
--- a/examples/caldavresource/caldavresource.cpp
+++ b/examples/caldavresource/caldavresource.cpp
@@ -30,6 +30,7 @@
30#include "facadefactory.h" 30#include "facadefactory.h"
31 31
32#include <KCalCore/ICalFormat> 32#include <KCalCore/ICalFormat>
33#include <QColor>
33 34
34#define ENTITY_TYPE_EVENT "event" 35#define ENTITY_TYPE_EVENT "event"
35#define ENTITY_TYPE_TODO "todo" 36#define ENTITY_TYPE_TODO "todo"
@@ -61,6 +62,7 @@ protected:
61 62
62 Calendar localCalendar; 63 Calendar localCalendar;
63 localCalendar.setName(remoteCalendar.displayName()); 64 localCalendar.setName(remoteCalendar.displayName());
65 localCalendar.setColor(remoteCalendar.color().name().toLatin1());
64 66
65 createOrModify(ENTITY_TYPE_CALENDAR, rid, localCalendar, 67 createOrModify(ENTITY_TYPE_CALENDAR, rid, localCalendar,
66 /* mergeCriteria = */ QHash<QByteArray, Sink::Query::Comparator>{}); 68 /* mergeCriteria = */ QHash<QByteArray, Sink::Query::Comparator>{});