summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--schemas/ical/kolabformat-xcal.xsd3
-rw-r--r--src/containers/incidence_p.h1
-rw-r--r--src/containers/kolabevent.cpp10
-rw-r--r--src/containers/kolabevent.h3
-rw-r--r--src/containers/kolabjournal.cpp9
-rw-r--r--src/containers/kolabjournal.h3
-rw-r--r--src/containers/kolabtodo.cpp10
-rw-r--r--src/containers/kolabtodo.h3
-rw-r--r--src/xcalconversions.h8
-rw-r--r--tests/bindingstest.cpp2
10 files changed, 52 insertions, 0 deletions
diff --git a/schemas/ical/kolabformat-xcal.xsd b/schemas/ical/kolabformat-xcal.xsd
index e3de445..0fe7310 100644
--- a/schemas/ical/kolabformat-xcal.xsd
+++ b/schemas/ical/kolabformat-xcal.xsd
@@ -107,6 +107,7 @@
<xs:element name="recurrence-id" type="RecurrenceIdPropType" minOccurs="0"/>
<xs:element name="summary" type="SummaryPropType" minOccurs="0"/>
<xs:element name="description" type="DescriptionPropType" minOccurs="0"/>
+ <xs:element name="comment" type="CommentPropType" minOccurs="0"/>
<xs:element name="priority" type="PriorityPropType" minOccurs="0"/>
<xs:element name="status" type="StatusPropType" minOccurs="0"/>
<xs:element name="location" type="LocationPropType" minOccurs="0"/>
@@ -148,6 +149,7 @@
<xs:element name="recurrence-id" type="RecurrenceIdPropType" minOccurs="0"/>
<xs:element name="summary" type="SummaryPropType" minOccurs="0"/>
<xs:element name="description" type="DescriptionPropType" minOccurs="0"/>
+ <xs:element name="comment" type="CommentPropType" minOccurs="0"/>
<xs:element name="priority" type="PriorityPropType" minOccurs="0"/>
<xs:element name="status" type="StatusPropType" minOccurs="0"/>
<xs:element name="percent-complete" type="PercentCompletePropType" minOccurs="0"/>
@@ -185,6 +187,7 @@
<xs:element name="dtstart" type="DtstartPropType" minOccurs="0"/>
<xs:element name="summary" type="SummaryPropType" minOccurs="0"/>
<xs:element name="description" type="DescriptionPropType" minOccurs="0"/>
+ <xs:element name="comment" type="CommentPropType" minOccurs="0"/>
<xs:element name="status" type="StatusPropType" minOccurs="0"/>
<xs:element name="contact" type="ContactPropType" minOccurs="0"/>
<xs:element name="attendee" type="AttendeePropType" minOccurs="0" maxOccurs="unbounded"/>
diff --git a/src/containers/incidence_p.h b/src/containers/incidence_p.h
index 854f849..9d1eecf 100644
--- a/src/containers/incidence_p.h
+++ b/src/containers/incidence_p.h
@@ -44,6 +44,7 @@ namespace Kolab {
bool thisAndFuture;
std::string summary;
std::string description;
+ std::string comment;
std::string location;
int priority;
Status status;
diff --git a/src/containers/kolabevent.cpp b/src/containers/kolabevent.cpp
index a1a97c5..1d38393 100644
--- a/src/containers/kolabevent.cpp
+++ b/src/containers/kolabevent.cpp
@@ -180,6 +180,16 @@ std::string Event::description() const
return d->description;
}
+void Event::setComment(const std::string &comment)
+{
+ d->comment = comment;
+}
+
+std::string Event::comment() const
+{
+ return d->comment;
+}
+
void Event::setPriority(int priority)
{
d->priority = priority;
diff --git a/src/containers/kolabevent.h b/src/containers/kolabevent.h
index a1df32e..d4179cd 100644
--- a/src/containers/kolabevent.h
+++ b/src/containers/kolabevent.h
@@ -85,6 +85,9 @@ public:
void setDescription(const std::string &);
std::string description() const;
+ void setComment(const std::string &);
+ std::string comment() const;
+
void setPriority(int);
int priority() const;
diff --git a/src/containers/kolabjournal.cpp b/src/containers/kolabjournal.cpp
index ce37fbc..0c07cf0 100644
--- a/src/containers/kolabjournal.cpp
+++ b/src/containers/kolabjournal.cpp
@@ -146,6 +146,15 @@ std::string Journal::description() const
return d->description;
}
+void Journal::setComment(const std::string &comment)
+{
+ d->comment = comment;
+}
+
+std::string Journal::comment() const
+{
+ return d->comment;
+}
void Journal::setStatus(Status status)
{
diff --git a/src/containers/kolabjournal.h b/src/containers/kolabjournal.h
index 9a904d3..b02353d 100644
--- a/src/containers/kolabjournal.h
+++ b/src/containers/kolabjournal.h
@@ -61,6 +61,9 @@ public:
void setDescription(const std::string &);
std::string description() const;
+ void setComment(const std::string &);
+ std::string comment() const;
+
void setStatus(Status);
Status status() const;
diff --git a/src/containers/kolabtodo.cpp b/src/containers/kolabtodo.cpp
index c80f2fe..ca78a20 100644
--- a/src/containers/kolabtodo.cpp
+++ b/src/containers/kolabtodo.cpp
@@ -195,6 +195,16 @@ std::string Todo::description() const
return d->description;
}
+void Todo::setComment(const std::string &comment)
+{
+ d->comment = comment;
+}
+
+std::string Todo::comment() const
+{
+ return d->comment;
+}
+
void Todo::setPriority(int priority)
{
d->priority = priority;
diff --git a/src/containers/kolabtodo.h b/src/containers/kolabtodo.h
index bad8cbf..76d0e18 100644
--- a/src/containers/kolabtodo.h
+++ b/src/containers/kolabtodo.h
@@ -84,6 +84,9 @@ public:
void setDescription(const std::string &);
std::string description() const;
+ void setComment(const std::string &);
+ std::string comment() const;
+
void setPriority(int);
int priority() const;
diff --git a/src/xcalconversions.h b/src/xcalconversions.h
index 85d98ed..b30053f 100644
--- a/src/xcalconversions.h
+++ b/src/xcalconversions.h
@@ -842,6 +842,10 @@ void setIncidenceProperties(I &inc, const T &prop)
inc.setDescription(toString(*prop.description()));
}
+ if (prop.comment()) {
+ inc.setComment(toString(*prop.comment()));
+ }
+
if (prop.status()) {
const std::string &status = toString(*prop.status());
if (status == NEEDSACTION) {
@@ -1118,6 +1122,10 @@ void getIncidenceProperties(T &prop, const I &inc)
prop.description(typename properties::description_type(inc.description()));
}
+ if (!inc.comment().empty()) {
+ prop.comment(typename properties::comment_type(inc.comment()));
+ }
+
if (inc.status() != StatusUndefined) {
switch (inc.status()) {
case StatusNeedsAction:
diff --git a/tests/bindingstest.cpp b/tests/bindingstest.cpp
index ec56712..6549319 100644
--- a/tests/bindingstest.cpp
+++ b/tests/bindingstest.cpp
@@ -241,6 +241,7 @@ void setIncidence(T &ev)
ev.setRecurrenceID(Kolab::cDateTime("Europe/Zurich", 2006,1,6,12,0,0), true);
ev.setSummary("summary");
ev.setDescription("description");
+ ev.setComment("comment");
ev.setPriority(3);
ev.setStatus(Kolab::StatusConfirmed);
ev.setLocation("location");
@@ -353,6 +354,7 @@ void checkIncidence(const T &ev, const T &re)
QCOMPARE(ev.thisAndFuture(), re.thisAndFuture());
QCOMPARE(ev.summary(), re.summary());
QCOMPARE(ev.description(), re.description());
+ QCOMPARE(ev.comment(), re.comment());
QCOMPARE(ev.priority(), re.priority());
QCOMPARE(ev.status(), re.status());
QCOMPARE(ev.location(), re.location());