summaryrefslogtreecommitdiff
path: root/user/calligra/kcalcore.patch
diff options
context:
space:
mode:
authorCyberLeo <cyberleo@cyberleo.net>2020-03-28 05:45:52 -0500
committerCyberLeo <cyberleo@cyberleo.net>2020-03-28 05:45:52 -0500
commit9297468fa579836e3a6a381b798feb6b78217c2d (patch)
tree53168212f427afbcf0693b534530a4af803152e9 /user/calligra/kcalcore.patch
parenta63cc05c53a6f4c22422dc8c69808b14d87a6f6e (diff)
parentda5a69b65a8791fffa6e93366ee585f87eff136d (diff)
downloadpackages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.gz
packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.bz2
packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.xz
packages-9297468fa579836e3a6a381b798feb6b78217c2d.zip
Merge branch 'master' into zfs
Diffstat (limited to 'user/calligra/kcalcore.patch')
-rw-r--r--user/calligra/kcalcore.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/user/calligra/kcalcore.patch b/user/calligra/kcalcore.patch
new file mode 100644
index 000000000..8124192db
--- /dev/null
+++ b/user/calligra/kcalcore.patch
@@ -0,0 +1,74 @@
+From 2d484fda1b31a72659088a4bfce5c3708e923cb0 Mon Sep 17 00:00:00 2001
+From: David Faure <faure@kde.org>
+Date: Tue, 23 Jul 2019 12:20:29 +0200
+Subject: Fix compilation after recent KCalCore API changes
+
+---
+ .../filters/icalendar/export/icalendarexport.cpp | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/plan/src/plugins/filters/icalendar/export/icalendarexport.cpp b/plan/src/plugins/filters/icalendar/export/icalendarexport.cpp
+index 757d693..daf1c2d 100644
+--- a/plan/src/plugins/filters/icalendar/export/icalendarexport.cpp
++++ b/plan/src/plugins/filters/icalendar/export/icalendarexport.cpp
+@@ -31,6 +31,7 @@
+ #include <kcalcore/attachment.h>
+ #include <kcalcore/icalformat.h>
+ #include <kcalcore/memorycalendar.h>
++#include <kcalcore_version.h>
+
+ #include <QTextCodec>
+ #include <QByteArray>
+@@ -140,9 +141,15 @@ void ICalendarExport::createTodos(KCalCore::Calendar::Ptr cal, const Node *node,
+ todo->setOrganizer(node->projectNode()->leader());
+ }
+ if ( node->type() != Node::Type_Project && ! node->leader().isEmpty()) {
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 90)
++ KCalCore::Person p = KCalCore::Person::fromFullName(node->leader());
++ KCalCore::Attendee a(p.name(), p.email());
++ a.setRole(KCalCore::Attendee::NonParticipant);
++#else
+ KCalCore::Person::Ptr p = KCalCore::Person::fromFullName(node->leader());
+ KCalCore::Attendee::Ptr a(new KCalCore::Attendee(p->name(), p->email()));
+ a->setRole(KCalCore::Attendee::NonParticipant);
++#endif
+ todo->addAttendee(a);
+ }
+ DateTime st = node->startTime(id);
+@@ -161,13 +168,21 @@ void ICalendarExport::createTodos(KCalCore::Calendar::Ptr cal, const Node *node,
+ const QList<Resource*> lst = task->requestedResources();
+ foreach(const Resource *r, lst) {
+ if (r->type() == Resource::Type_Work) {
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 90)
++ todo->addAttendee(KCalCore::Attendee(r->name(), r->email()));
++#else
+ todo->addAttendee(KCalCore::Attendee::Ptr(new KCalCore::Attendee(r->name(), r->email())));
++#endif
+ }
+ }
+ } else {
+ foreach(const Resource *r, s->resources()) {
+ if (r->type() == Resource::Type_Work) {
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 90)
++ todo->addAttendee(KCalCore::Attendee(r->name(), r->email()));
++#else
+ todo->addAttendee(KCalCore::Attendee::Ptr(new KCalCore::Attendee(r->name(), r->email())));
++#endif
+ }
+ }
+
+@@ -178,7 +193,11 @@ void ICalendarExport::createTodos(KCalCore::Calendar::Ptr cal, const Node *node,
+ todo->setPercentComplete(task->completion().percentFinished());
+ }
+ foreach(const Document *doc, node->documents().documents()) {
++#if KCALCORE_VERSION >= QT_VERSION_CHECK(5, 11, 90)
++ todo->addAttachment(KCalCore::Attachment(doc->url().url()));
++#else
+ todo->addAttachment(KCalCore::Attachment::Ptr(new KCalCore::Attachment(doc->url().url())));
++#endif
+ }
+ if (! parent.isNull()) {
+ todo->setRelatedTo(parent->uid(), KCalCore::Incidence::RelTypeParent);
+--
+cgit v1.1
+