aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorAdriaan de Groot <adridg@FreeBSD.org>2019-08-19 17:55:16 +0000
committerAdriaan de Groot <adridg@FreeBSD.org>2019-08-19 17:55:16 +0000
commit29e9753887e4e2bf0bfdbd1e84b7a07a0a505cfd (patch)
treed05616ce876db4e797c77fd502d28384f7b2ac7c /editors
parentf6f23c5314630ab1657f9dd862ec95ae4c9a2e03 (diff)
downloadports-29e9753887e4e2bf0bfdbd1e84b7a07a0a505cfd.tar.gz
ports-29e9753887e4e2bf0bfdbd1e84b7a07a0a505cfd.zip
Fix build of editors/calligraplan.
The patch is from upstream, via openSUSE, and modified so it just hard-codes the version of KDE Frameworks (KCalCore in particular) in ports at this time. That makes it pick the new API introduced in KF5 5.61. Reported by: pkg-fallout
Notes
Notes: svn path=/head/; revision=509297
Diffstat (limited to 'editors')
-rw-r--r--editors/calligraplan/files/patch-src_plugins_filters_icalendar_export_icalendarexport.cpp68
1 files changed, 68 insertions, 0 deletions
diff --git a/editors/calligraplan/files/patch-src_plugins_filters_icalendar_export_icalendarexport.cpp b/editors/calligraplan/files/patch-src_plugins_filters_icalendar_export_icalendarexport.cpp
new file mode 100644
index 000000000000..09389624012a
--- /dev/null
+++ b/editors/calligraplan/files/patch-src_plugins_filters_icalendar_export_icalendarexport.cpp
@@ -0,0 +1,68 @@
+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
+
+
+diff --git a/src/plugins/filters/icalendar/export/icalendarexport.cpp b/src/plugins/filters/icalendar/export/icalendarexport.cpp
+index 757d693..5eba36b 100644
+--- src/plugins/filters/icalendar/export/icalendarexport.cpp
++++ src/plugins/filters/icalendar/export/icalendarexport.cpp
+@@ -31,6 +31,7 @@
+ #include <kcalcore/attachment.h>
+ #include <kcalcore/icalformat.h>
+ #include <kcalcore/memorycalendar.h>
++#define KCALCORE_VERSION QT_VERSION_CHECK(5,61,0)
+
+ #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, 80)
++ 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, 80)
++ 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, 80)
++ 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, 80)
++ 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);