Hello community,

here is the log from the commit of package kcalendarcore for openSUSE:Factory 
checked in at 2020-12-15 12:28:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kcalendarcore (Old)
 and      /work/SRC/openSUSE:Factory/.kcalendarcore.new.2328 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kcalendarcore"

Tue Dec 15 12:28:09 2020 rev:14 rq:855411 version:5.77.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kcalendarcore/kcalendarcore.changes      
2020-11-23 10:31:43.569442554 +0100
+++ /work/SRC/openSUSE:Factory/.kcalendarcore.new.2328/kcalendarcore.changes    
2020-12-15 12:29:59.079980980 +0100
@@ -1,0 +2,14 @@
+Sat Dec  5 18:56:16 UTC 2020 - Christophe Giboudeaux <[email protected]>
+
+- Update to 5.77.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/kde-frameworks-5.77.0
+- Changes since 5.76.0:
+  * Fix maintainer, that is supposed to be Allen Winter
+  * Re-add COLOR property serialization from RFC7986.
+  * Add support for CONFERENCE property
+  * Add alarmsTo convenience method to Calendar
+  * Check that by day recurrences do not precede dtStart.
+
+-------------------------------------------------------------------

Old:
----
  kcalendarcore-5.76.0.tar.xz
  kcalendarcore-5.76.0.tar.xz.sig

New:
----
  kcalendarcore-5.77.0.tar.xz
  kcalendarcore-5.77.0.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kcalendarcore.spec ++++++
--- /var/tmp/diff_new_pack.4xMitt/_old  2020-12-15 12:29:59.655981444 +0100
+++ /var/tmp/diff_new_pack.4xMitt/_new  2020-12-15 12:29:59.659981448 +0100
@@ -16,14 +16,14 @@
 #
 
 
-%define _tar_path 5.76
+%define _tar_path 5.77
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
 %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | 
awk -F. '{print $1"."$2}')}
 %bcond_without lang
 Name:           kcalendarcore
-Version:        5.76.0
+Version:        5.77.0
 Release:        0
 Summary:        Library to access and handle calendar data
 License:        LGPL-2.0-or-later
@@ -36,9 +36,9 @@
 %endif
 BuildRequires:  extra-cmake-modules >= %{_kf5_version}
 BuildRequires:  cmake(LibIcal) >= 2.0
-BuildRequires:  cmake(Qt5Core) >= 5.12.0
-BuildRequires:  cmake(Qt5Gui) >= 5.12.0
-BuildRequires:  cmake(Qt5Test) >= 5.12.0
+BuildRequires:  cmake(Qt5Core) >= 5.13.0
+BuildRequires:  cmake(Qt5Gui) >= 5.13.0
+BuildRequires:  cmake(Qt5Test) >= 5.13.0
 
 %description
 KCalendarCore is a library to provide access to and handling of calendar data.


++++++ kcalendarcore-5.76.0.tar.xz -> kcalendarcore-5.77.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/CMakeLists.txt 
new/kcalendarcore-5.77.0/CMakeLists.txt
--- old/kcalendarcore-5.76.0/CMakeLists.txt     2020-11-08 15:41:47.000000000 
+0100
+++ new/kcalendarcore-5.77.0/CMakeLists.txt     2020-12-05 11:03:04.000000000 
+0100
@@ -1,17 +1,17 @@
 cmake_minimum_required(VERSION 3.5)
-set(KF5_VERSION "5.76.0") # handled by release scripts
+set(KF5_VERSION "5.77.0") # handled by release scripts
 
 project(KCalendarCore VERSION ${KF5_VERSION})
 
 # ECM setup
 include(FeatureSummary)
-find_package(ECM 5.76.0  NO_MODULE)
+find_package(ECM 5.77.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL "https://commits.kde.org/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
 
-set(REQUIRED_QT_VERSION 5.12.0)
+set(REQUIRED_QT_VERSION 5.13.0)
 
 include(KDEInstallDirs)
 include(KDECMakeSettings)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/autotests/CMakeLists.txt 
new/kcalendarcore-5.77.0/autotests/CMakeLists.txt
--- old/kcalendarcore-5.76.0/autotests/CMakeLists.txt   2020-11-08 
15:41:47.000000000 +0100
+++ new/kcalendarcore-5.77.0/autotests/CMakeLists.txt   2020-12-05 
11:03:04.000000000 +0100
@@ -19,6 +19,7 @@
   testattachment
   testattendee
   testcalfilter
+  testconference
   testcustomproperties
   testdateserialization
   testduration
@@ -57,6 +58,7 @@
 
 set_target_properties(testmemorycalendar PROPERTIES COMPILE_FLAGS 
-DICALTESTDATADIR="\\"${CMAKE_CURRENT_SOURCE_DIR}/data/\\"")
 set_target_properties(testreadrecurrenceid PROPERTIES COMPILE_FLAGS 
-DICALTESTDATADIR="\\"${CMAKE_CURRENT_SOURCE_DIR}/data/\\"")
+set_target_properties(testconference PROPERTIES COMPILE_FLAGS 
-DICALTESTDATADIR="\\"${CMAKE_CURRENT_SOURCE_DIR}/data/\\"")
 # this test cannot work with msvc because libical should not be altered
 # and therefore we can't add KCALENDARCORE_EXPORT there
 # it should work fine with mingw because of the auto-import feature
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kcalendarcore-5.76.0/autotests/data/test_conference.ics 
new/kcalendarcore-5.77.0/autotests/data/test_conference.ics
--- old/kcalendarcore-5.76.0/autotests/data/test_conference.ics 1970-01-01 
01:00:00.000000000 +0100
+++ new/kcalendarcore-5.77.0/autotests/data/test_conference.ics 2020-12-05 
11:03:04.000000000 +0100
@@ -0,0 +1,94 @@
+BEGIN:VCALENDAR
+PRODID:-//K Desktop Environment//NONSGML libkcal 4.3//EN
+VERSION:2.0
+X-KDE-ICAL-IMPLEMENTATION-VERSION:1.0
+BEGIN:VTIMEZONE
+TZID:Europe/Berlin
+BEGIN:DAYLIGHT
+TZNAME:CEST
+TZOFFSETFROM:+0000
+TZOFFSETTO:+0200
+DTSTART:19800406T010000
+RDATE:19800406T010000
+END:DAYLIGHT
+BEGIN:STANDARD
+TZNAME:CET
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+DTSTART:19971026T030000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+BEGIN:STANDARD
+TZNAME:CET
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+DTSTART:19800928T030000
+RRULE:FREQ=YEARLY;UNTIL=19961027T030000;BYDAY=-1SU;BYMONTH=9
+RDATE:19950924T030000
+END:STANDARD
+BEGIN:DAYLIGHT
+TZNAME:CEST
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+DTSTART:19810329T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VTIMEZONE
+TZID:Europe/Prague
+BEGIN:DAYLIGHT
+TZNAME:CEST
+TZOFFSETFROM:+0000
+TZOFFSETTO:+0200
+DTSTART:19790401T010000
+RDATE:19790401T010000
+END:DAYLIGHT
+BEGIN:STANDARD
+TZNAME:CET
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+DTSTART:19971026T030000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+BEGIN:STANDARD
+TZNAME:CET
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+DTSTART:19790930T030000
+RRULE:FREQ=YEARLY;UNTIL=19961027T030000;BYDAY=-1SU;BYMONTH=9
+RDATE:19950924T030000
+END:STANDARD
+BEGIN:DAYLIGHT
+TZNAME:CEST
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+DTSTART:19810329T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:DAYLIGHT
+TZNAME:CEST
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+DTSTART:19800406T020000
+RDATE:19800406T020000
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+ORGANIZER;CN=Daniel Vrátil:MAILTO:[email protected]
+DTSTAMP:20201116T134859Z
+ATTENDEE;RSVP=FALSE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;
+ CUTYPE=INDIVIDUAL;X-UID=189296704:mailto:[email protected]
+ATTENDEE;RSVP=FALSE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;
+ CUTYPE=INDIVIDUAL;X-UID=192611760:mailto:[email protected]
+CREATED:20201116T134859Z
+UID:bb320b0a-6ee3-4a91-8304-4b8d96bb141f
+LAST-MODIFIED:20201116T134859Z
+SUMMARY:Conference call with colleagues
+RRULE:FREQ=WEEKLY;BYDAY=MO
+DTSTART;TZID=Europe/Prague:20201116T150000
+DTEND;TZID=Europe/Prague:20201116T160000
+TRANSP:OPAQUE
+CONFERENCE;VALUE=URI;FEATURE=AUDIO,VIDEO;
+ LABEL=Join NextCloud Talk, password is 
12345:https://corp.kde.example/call/efi83r28
+END:VEVENT
+END:VCALENDAR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/autotests/testconference.cpp 
new/kcalendarcore-5.77.0/autotests/testconference.cpp
--- old/kcalendarcore-5.76.0/autotests/testconference.cpp       1970-01-01 
01:00:00.000000000 +0100
+++ new/kcalendarcore-5.77.0/autotests/testconference.cpp       2020-12-05 
11:03:04.000000000 +0100
@@ -0,0 +1,107 @@
+/*
+  This file is part of the kcalcore library.
+  SPDX-FileCopyrightText: 2020 Daniel Vrátil <[email protected]>
+
+  SPDX-License-Identifier: LGPL-2.0-or-later
+*/
+
+#include "testconference.h"
+#include "conference.h"
+#include "memorycalendar.h"
+#include "filestorage.h"
+
+#include <QDataStream>
+#include <QTest>
+
+QTEST_MAIN(ConferenceTest)
+
+using namespace KCalendarCore;
+
+void ConferenceTest::testValidity()
+{
+    {
+        Conference test;
+        QVERIFY(test.isNull());
+    }
+
+    {
+        Conference test(QUrl(QStringLiteral("tel:000326870")),
+                        QStringLiteral("Phone call for conference"));
+        QVERIFY(!test.isNull());
+    }
+}
+
+void ConferenceTest::testCompare()
+{
+    Conference conf1{QUrl{QStringLiteral("tel:123456789")},
+                     QStringLiteral("Conference call"),
+                     {QStringLiteral("PHONE")},
+                     QStringLiteral("en")};
+    Conference 
conf2{QUrl{QStringLiteral("xmpp:[email protected]")},
+                     QStringLiteral("Conference chat"),
+                     {QStringLiteral("CHAT")},
+                     QStringLiteral("en")};
+    QVERIFY(conf1 != conf2);
+
+    conf2.setUri(QUrl{QStringLiteral("tel:123456789")});
+    conf2.setLabel(QStringLiteral("Conference call"));
+    conf2.setFeatures({QStringLiteral("PHONE")});
+    conf2.setLanguage(QStringLiteral("en"));
+
+    QVERIFY(conf1 == conf2);
+}
+
+void ConferenceTest::testAssign()
+{
+    Conference conf1{QUrl{QStringLiteral("sip:[email protected]")}, 
QStringLiteral("SIP Call")};
+    Conference conf2 = conf1;
+    QCOMPARE(conf1, conf2);
+
+    conf2.setLanguage(QStringLiteral("en"));
+    QVERIFY(!(conf1 == conf2));
+
+    Conference conf3(conf1);
+    QCOMPARE(conf3, conf1);
+}
+
+void ConferenceTest::testDataStream()
+{
+    Conference conf1;
+    conf1.setUri(QUrl{QStringLiteral("tel:000326870")});
+    conf1.setLabel(QStringLiteral("Phone conference"));
+    conf1.addFeature(QStringLiteral("PHONE"));
+    conf1.setLanguage(QStringLiteral("en"));
+
+    QByteArray byteArray;
+    QDataStream out_stream(&byteArray, QIODevice::WriteOnly);
+
+    out_stream << conf1;
+
+    QDataStream in_stream(&byteArray, QIODevice::ReadOnly);
+
+    Conference conf2;
+
+    in_stream >> conf2;
+
+    QCOMPARE(conf2.uri(), conf1.uri());
+    QCOMPARE(conf2.label(), conf1.label());
+    QCOMPARE(conf2.features(), conf1.features());
+    QCOMPARE(conf2.language(), conf1.language());
+}
+
+void ConferenceTest::testLoading()
+{
+    MemoryCalendar::Ptr cal(new MemoryCalendar(QTimeZone::utc()));
+    FileStorage store(cal, QLatin1String(ICALTESTDATADIR) + 
QLatin1String("test_conference.ics"));
+    QVERIFY(store.load());
+    const auto events = cal->events();
+    QCOMPARE(events.size(), 1);
+
+    const auto event = events.at(0);
+    const auto conferences = event->conferences();
+    QCOMPARE(conferences.size(), 1);
+    const auto conference = conferences.at(0);
+    QCOMPARE(conference.uri(), 
QUrl{QStringLiteral("https://corp.kde.example/call/efi83r28";)});
+    QCOMPARE(conference.features(), (QStringList{QStringLiteral("AUDIO"), 
QStringLiteral("VIDEO")}));
+    QCOMPARE(conference.label(), QStringLiteral("Join NextCloud Talk, password 
is 12345"));
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/autotests/testconference.h 
new/kcalendarcore-5.77.0/autotests/testconference.h
--- old/kcalendarcore-5.76.0/autotests/testconference.h 1970-01-01 
01:00:00.000000000 +0100
+++ new/kcalendarcore-5.77.0/autotests/testconference.h 2020-12-05 
11:03:04.000000000 +0100
@@ -0,0 +1,24 @@
+/*
+  This file is part of the kcalcore library.
+  SPDX-FileCopyrightText: 2020 Daniel Vrátil <[email protected]>
+
+  SPDX-License-Identifier: LGPL-2.0-or-later
+*/
+
+#ifndef TESTCONFERENCE_H
+#define TESTCONFERENCE_H
+
+#include <QObject>
+
+class ConferenceTest: public QObject
+{
+    Q_OBJECT
+private Q_SLOTS:
+    void testValidity();
+    void testCompare();
+    void testAssign();
+    void testDataStream();
+    void testLoading();
+};
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/autotests/testicalformat.cpp 
new/kcalendarcore-5.77.0/autotests/testicalformat.cpp
--- old/kcalendarcore-5.76.0/autotests/testicalformat.cpp       2020-11-08 
15:41:47.000000000 +0100
+++ new/kcalendarcore-5.77.0/autotests/testicalformat.cpp       2020-12-05 
11:03:04.000000000 +0100
@@ -20,6 +20,80 @@
 
 using namespace KCalendarCore;
 
+void ICalFormatTest::testDeserializeSerialize()
+{
+    ICalFormat format;
+
+    const QString serializedCalendar
+        = QLatin1String("BEGIN:VCALENDAR\n"
+                        "PRODID:-//IDN nextcloud.com//Calendar app 2.0.4//EN\n"
+                        "VERSION:2.0\n"
+                        "BEGIN:VEVENT\n"
+                        "CREATED:20201103T161248Z\n"
+                        "DTSTAMP:20201103T161340Z\n"
+                        "LAST-MODIFIED:20201103T161340Z\n"
+                        "SEQUENCE:2\n"
+                        "UID:bd1d299d-3b03-4514-be69-e680ad2ff884\n"
+                        "DTSTART;TZID=Europe/Paris:20201103T100000\n"
+                        "DTEND;TZID=Europe/Paris:20201103T110000\n"
+                        "SUMMARY:test recur\n"
+                        "RRULE:FREQ=DAILY;COUNT=4\n"
+                        "END:VEVENT\n"
+                        "BEGIN:VEVENT\n"
+                        "CREATED:20201103T161823Z\n"
+                        "DTSTAMP:20201103T161823Z\n"
+                        "LAST-MODIFIED:20201103T161823Z\n"
+                        "SEQUENCE:1\n"
+                        "UID:bd1d299d-3b03-4514-be69-e680ad2ff884\n"
+                        "DTSTART;TZID=Europe/Paris:20201104T111500\n"
+                        "DTEND;TZID=Europe/Paris:20201104T121500\n"
+                        "SUMMARY:test recur\n"
+                        "COLOR:khaki\n"
+                        "RECURRENCE-ID;TZID=Europe/Paris:20201104T100000\n"
+                        "END:VEVENT\n"
+                        "END:VCALENDAR");
+    MemoryCalendar::Ptr calendar = MemoryCalendar::Ptr(new 
MemoryCalendar(QTimeZone::utc()));
+    QVERIFY(format.fromString(calendar, serializedCalendar));
+    const QString uid = 
QString::fromLatin1("bd1d299d-3b03-4514-be69-e680ad2ff884");
+    Incidence::Ptr parent = calendar->incidence(uid);
+    QVERIFY(parent);
+    const QDateTime start(QDate(2020, 11, 3), QTime(9,0), QTimeZone::utc());
+    QCOMPARE(parent->dtStart(), start);
+    QCOMPARE(parent.staticCast<Event>()->dtEnd(), start.addSecs(3600));
+    QCOMPARE(parent->summary(), QString::fromLatin1("test recur"));
+    QCOMPARE(parent->revision(), 2);
+    Recurrence *recur = parent->recurrence();
+    QVERIFY(recur->recurs());
+    QCOMPARE(recur->duration(), 4);
+    QCOMPARE(recur->recurrenceType(), static_cast<ushort>(Recurrence::rDaily));
+
+    Incidence::Ptr occurrence = calendar->incidence(uid, start.addDays(1));
+    QVERIFY(occurrence);
+    const QDateTime startOcc(QDate(2020, 11, 4), QTime(10,15), 
QTimeZone::utc());
+    QCOMPARE(occurrence->dtStart(), startOcc);
+    QCOMPARE(occurrence.staticCast<Event>()->dtEnd(), startOcc.addSecs(3600));
+#if defined(USE_ICAL_3)
+    QCOMPARE(occurrence->color(), QString::fromLatin1("khaki"));
+#else
+    QVERIFY(occurrence->color().isEmpty());
+#endif
+    QCOMPARE(occurrence->summary(), QString::fromLatin1("test recur"));
+    QCOMPARE(occurrence->revision(), 1);
+    QVERIFY(occurrence->hasRecurrenceId());
+    QCOMPARE(occurrence->recurrenceId(), start.addDays(1));
+
+    const QString serialization = format.toString(calendar, QString());
+    QVERIFY(!serialization.isEmpty());
+    MemoryCalendar::Ptr check = MemoryCalendar::Ptr(new 
MemoryCalendar(QTimeZone::utc()));
+    QVERIFY(format.fromString(check, serialization));
+    Incidence::Ptr reparent = check->incidence(uid);
+    QVERIFY(reparent);
+    QCOMPARE(*parent, *reparent);
+    Incidence::Ptr reoccurence = check->incidence(uid, start.addDays(1));
+    QVERIFY(reoccurence);
+    QCOMPARE(*occurrence, *reoccurence);
+}
+
 void ICalFormatTest::testCharsets()
 {
     ICalFormat format;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/autotests/testicalformat.h 
new/kcalendarcore-5.77.0/autotests/testicalformat.h
--- old/kcalendarcore-5.76.0/autotests/testicalformat.h 2020-11-08 
15:41:47.000000000 +0100
+++ new/kcalendarcore-5.77.0/autotests/testicalformat.h 2020-12-05 
11:03:04.000000000 +0100
@@ -16,6 +16,7 @@
 {
     Q_OBJECT
 private Q_SLOTS:
+    void testDeserializeSerialize();
     void testCharsets();
     void testVolatileProperties();
     void testCuType();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kcalendarcore-5.76.0/autotests/testtimesininterval.cpp 
new/kcalendarcore-5.77.0/autotests/testtimesininterval.cpp
--- old/kcalendarcore-5.76.0/autotests/testtimesininterval.cpp  2020-11-08 
15:41:47.000000000 +0100
+++ new/kcalendarcore-5.77.0/autotests/testtimesininterval.cpp  2020-12-05 
11:03:04.000000000 +0100
@@ -254,3 +254,45 @@
     }
     QCOMPARE(timesInInterval.size(), expectedDays.size());
 }
+
+//Test that the recurrence dtStart is used for calculation and not the 
interval start date
+void TimesInIntervalTest::testByDayRecurrence()
+{
+    const int days = 7;
+    const QDateTime start(QDate(2020, 11, 6), QTime(2, 0, 0), Qt::UTC);
+    const QDateTime intervalEnd = start.addDays(days);
+    const QDateTime intervalStart = start.addDays(-days);
+
+    Event::Ptr event(new Event());
+    event->setDtStart(start);
+    event->setDtEnd(start.addSecs(3600));
+
+    RecurrenceRule * const rule = new RecurrenceRule();
+    rule->setRecurrenceType(RecurrenceRule::rWeekly);
+    rule->setStartDt(event->dtStart()); // the start day is a Friday
+    rule->setFrequency(1);
+    rule->setByDays(QList<RecurrenceRule::WDayPos>()
+            << RecurrenceRule::WDayPos(0, 2)   // Tuesday
+            << RecurrenceRule::WDayPos(0, 3)   // Wednesday
+            << RecurrenceRule::WDayPos(0, 4)   // Thursday
+            << RecurrenceRule::WDayPos(0, 5)); // Friday
+    event->recurrence()->addRRule(rule);
+
+    QList<QDateTime> expectedEventOccurrences;
+    for (int i = 0; i <= days; ++i) {
+        const QDateTime dt = start.addDays(i);
+        if (dt.date().dayOfWeek() < 6 && dt.date().dayOfWeek() > 1) {
+            expectedEventOccurrences << dt;
+        }
+    }
+
+    QCOMPARE(event->recurrence()->getNextDateTime(intervalStart), start);
+    QCOMPARE(event->recurrence()->getNextDateTime(start.addDays(1)), 
start.addDays(4));
+
+    const QList<QDateTime> timesInInterval = 
event->recurrence()->timesInInterval(intervalStart, intervalEnd);
+    for (const QDateTime &dt : timesInInterval) {
+        QCOMPARE(expectedEventOccurrences.removeAll(dt), 1);
+    }
+
+    QCOMPARE(expectedEventOccurrences.size(), 0);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/autotests/testtimesininterval.h 
new/kcalendarcore-5.77.0/autotests/testtimesininterval.h
--- old/kcalendarcore-5.76.0/autotests/testtimesininterval.h    2020-11-08 
15:41:47.000000000 +0100
+++ new/kcalendarcore-5.77.0/autotests/testtimesininterval.h    2020-12-05 
11:03:04.000000000 +0100
@@ -22,6 +22,7 @@
     void testSubDailyRecurrenceIntervalLimits();
     void testLocalTimeHandlingNonAllDay();
     void testLocalTimeHandlingAllDay();
+    void testByDayRecurrence();
 };
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/metainfo.yaml 
new/kcalendarcore-5.77.0/metainfo.yaml
--- old/kcalendarcore-5.76.0/metainfo.yaml      2020-11-08 15:41:47.000000000 
+0100
+++ new/kcalendarcore-5.77.0/metainfo.yaml      2020-12-05 11:03:04.000000000 
+0100
@@ -1,4 +1,4 @@
-maintainer: vkrause
+maintainer: winterz
 description: The KDE calendar access library
 tier: 1
 type: functional
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/src/CMakeLists.txt 
new/kcalendarcore-5.77.0/src/CMakeLists.txt
--- old/kcalendarcore-5.76.0/src/CMakeLists.txt 2020-11-08 15:41:47.000000000 
+0100
+++ new/kcalendarcore-5.77.0/src/CMakeLists.txt 2020-12-05 11:03:04.000000000 
+0100
@@ -10,6 +10,7 @@
   calformat.cpp
   calstorage.cpp
   compat.cpp
+  conference.cpp
   customproperties.cpp
   duration.cpp
   event.cpp
@@ -92,6 +93,7 @@
   CalFormat
   CalStorage
   Calendar
+  Conference
   CustomProperties
   Duration
   Event
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/src/calendar.cpp 
new/kcalendarcore-5.77.0/src/calendar.cpp
--- old/kcalendarcore-5.76.0/src/calendar.cpp   2020-11-08 15:41:47.000000000 
+0100
+++ new/kcalendarcore-5.77.0/src/calendar.cpp   2020-12-05 11:03:04.000000000 
+0100
@@ -1366,6 +1366,11 @@
     return d->mDeletionTracking;
 }
 
+Alarm::List Calendar::alarmsTo(const QDateTime &to) const
+{
+    return alarms(QDateTime(QDate(1900, 1, 1), QTime(0, 0, 0)), to);
+}
+
 void Calendar::virtual_hook(int id, void *data)
 {
     Q_UNUSED(id);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/src/calendar.h 
new/kcalendarcore-5.77.0/src/calendar.h
--- old/kcalendarcore-5.76.0/src/calendar.h     2020-11-08 15:41:47.000000000 
+0100
+++ new/kcalendarcore-5.77.0/src/calendar.h     2020-12-05 11:03:04.000000000 
+0100
@@ -1197,6 +1197,16 @@
     */
     virtual Alarm::List alarms(const QDateTime &from, const QDateTime &to, 
bool excludeBlockedAlarms = false) const = 0;
 
+    /**
+      Return a list of Alarms that occur before the specified timestamp.
+
+      @param to is the ending timestamp.
+      @return the list of Alarms occurring before the specified QDateTime.
+      @since 5.77
+    */
+    Q_REQUIRED_RESULT Alarm::List alarmsTo(const QDateTime &to) const;
+
+
     // Observer Specific Methods //
 
     /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/src/conference.cpp 
new/kcalendarcore-5.77.0/src/conference.cpp
--- old/kcalendarcore-5.76.0/src/conference.cpp 1970-01-01 01:00:00.000000000 
+0100
+++ new/kcalendarcore-5.77.0/src/conference.cpp 2020-12-05 11:03:04.000000000 
+0100
@@ -0,0 +1,154 @@
+/*
+  This file is part of the kcalcore library.
+
+  SPDX-FileCopyrightText: 2020 Daniel Vrátil <[email protected]>
+
+  SPDX-License-Identifier: LGPL-2.0-or-later
+*/
+
+#include "conference.h"
+
+#include <QDataStream>
+#include <QDebug>
+
+using namespace KCalendarCore;
+
+/**
+  Private class that helps to provide binary compatibility between releases.
+  @internal
+*/
+//@cond PRIVATE
+class Q_DECL_HIDDEN KCalendarCore::Conference::Private : public QSharedData
+{
+public:
+    QString label;
+    QString language;
+    QStringList features;
+    QUrl uri;
+    CustomProperties customProperties;
+};
+//@endcond
+
+Conference::Conference()
+    : d(new Conference::Private)
+{
+}
+
+Conference::Conference(const QUrl &uri, const QString &label, const 
QStringList &features, const QString &language)
+    : d(new Conference::Private)
+{
+    setUri(uri);
+    setLabel(label);
+    setFeatures(features);
+    setLanguage(language);
+}
+
+Conference::Conference(const Conference &) = default;
+
+Conference::~Conference() = default;
+
+bool Conference::isNull() const
+{
+    // isNull rather than isEmpty, as user code is actually creating empty but 
non-null conferences...
+    return !d->uri.isValid() && d->label.isNull();
+}
+
+bool KCalendarCore::Conference::operator==(const Conference &other) const
+{
+    return std::tie(d->label, d->language, d->features, d->uri)
+            == std::tie(other.d->label, other.d->language, other.d->features, 
other.d->uri);
+}
+
+bool KCalendarCore::Conference::operator!=(const Conference &other) const
+{
+    return !operator==(other);
+}
+
+Conference &KCalendarCore::Conference::operator=(const Conference &) = default;
+
+QUrl Conference::uri() const
+{
+    return d->uri;
+}
+
+void Conference::setUri(const QUrl &uri)
+{
+    d->uri = uri;
+}
+
+QString Conference::label() const
+{
+    return d->label;
+}
+
+void Conference::setLabel(const QString &label)
+{
+    d->label = label;
+}
+
+QStringList Conference::features() const
+{
+    return d->features;
+}
+
+void Conference::addFeature(const QString &feature)
+{
+    d->features.push_back(feature);
+}
+
+void Conference::removeFeature(const QString &feature)
+{
+    d->features.removeAll(feature);
+}
+
+void Conference::setFeatures(const QStringList &features)
+{
+    d->features = features;
+}
+
+QString Conference::language() const
+{
+    return d->language;
+}
+
+void Conference::setLanguage(const QString &language)
+{
+    d->language = language;
+}
+
+void Conference::setCustomProperty(const QByteArray &xname, const QString 
&xvalue)
+{
+    d->customProperties.setNonKDECustomProperty(xname, xvalue);
+}
+
+CustomProperties &Conference::customProperties()
+{
+    return d->customProperties;
+}
+
+const CustomProperties &Conference::customProperties() const
+{
+    return d->customProperties;
+}
+
+QDataStream &KCalendarCore::operator<<(QDataStream &stream, const 
KCalendarCore::Conference &conference)
+{
+    return stream << conference.d->uri
+                  << conference.d->label
+                  << conference.d->features
+                  << conference.d->language
+                  << conference.d->customProperties;
+}
+
+QDataStream &KCalendarCore::operator>>(QDataStream &stream, 
KCalendarCore::Conference &conference)
+{
+    Conference conf;
+    stream >> conf.d->uri
+           >> conf.d->label
+           >> conf.d->features
+           >> conf.d->language
+           >> conf.d->customProperties;
+    conference = conf;
+
+    return stream;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/src/conference.h 
new/kcalendarcore-5.77.0/src/conference.h
--- old/kcalendarcore-5.76.0/src/conference.h   1970-01-01 01:00:00.000000000 
+0100
+++ new/kcalendarcore-5.77.0/src/conference.h   2020-12-05 11:03:04.000000000 
+0100
@@ -0,0 +1,203 @@
+/*
+  This file is part of the kcalcore library.
+
+  SPDX-FileCopyrightText: 2020 Daniel Vrátil <[email protected]>
+
+  SPDX-License-Identifier: LGPL-2.0-or-later
+*/
+
+#ifndef KCALCORE_CONFERENCE_H
+#define KCALCORE_CONFERENCE_H
+
+#include <QMetaType>
+#include <QSharedDataPointer>
+#include <QUrl>
+
+#include "kcalendarcore_export.h"
+#include "customproperties.h"
+
+namespace KCalendarCore
+{
+
+/**
+  @brief
+  Represents information related to a conference information of an Calendar
+  Incidence, typically a meeting or task (to-do).
+
+  Conference contains information needed to join a remote conference system
+  (e.g. phone call, audio/video meeting etc.)
+
+  @since 5.77
+*/
+class KCALENDARCORE_EXPORT Conference
+{
+    Q_GADGET
+    Q_PROPERTY(bool isNull READ isNull)
+    Q_PROPERTY(QStringList features READ features WRITE setFeatures)
+    Q_PROPERTY(QString label READ label WRITE setLabel)
+    Q_PROPERTY(QUrl uri READ uri WRITE setUri)
+    Q_PROPERTY(QString language READ language WRITE setLanguage)
+
+public:
+    using List = QVector<Conference>;
+
+    /** Create a null Conference. */
+    explicit Conference();
+
+    /**
+      Constructs a conference consisting of a @p uri, description of
+      the URI (@p label), list of features of the conference (@p features)
+      and @p langauge.
+
+      @param uri Uri to join the conference.
+      @param label Label of the URI.
+      @param features Features of this particular conference method.
+      @param language Language of the information present in other fields.
+    */
+    Conference(const QUrl &uri, const QString &label,
+               const QStringList &features = {},
+               const QString &language = {});
+
+    /**
+      Constructs a conference by copying another conference.
+
+      @param conference is the conference to be copied.
+    */
+    Conference(const Conference &conference);
+
+    /**
+      Destroys the conference.
+    */
+    ~Conference();
+
+    /**
+      Compares this with @p conference for equality.
+
+      @param conference the conference to compare.
+    */
+    bool operator==(const Conference &conference) const;
+
+    /**
+      Compares this with @p conference for inequality.
+
+      @param conference the conference to compare.
+    */
+    bool operator!=(const Conference &other) const;
+
+    /**
+     * Returns @c true if this is a default-constructed Conference instance.
+     */
+    Q_REQUIRED_RESULT bool isNull() const;
+
+    /**
+     * Returns URI to join the conference, with access code included.
+     */
+    Q_REQUIRED_RESULT QUrl uri() const;
+
+    /**
+     * Sets the URI to @uri.
+     */
+    void setUri(const QUrl &uri);
+
+    /**
+     * Returns label with additional details regarding further use of the URI.
+     */
+    Q_REQUIRED_RESULT QString label() const;
+
+    /**
+     * Sets the URI label to @p label.
+     */
+    void setLabel(const QString &label);
+
+    /**
+     * Returns the list of features of the conferencing system at given URI.
+     *
+     * This can be e.g. CHAT, AUDIO, VIDEO, PHONE, etc.
+     */
+    Q_REQUIRED_RESULT QStringList features() const;
+
+    /**
+     * Adds @p feature to the list of features.
+     *
+     * @param feature Feature to add.
+     */
+    void addFeature(const QString &feature);
+
+    /**
+     * Removes @p feature from the list of features.
+     *
+     * @param feature Feature to remove.
+     */
+    void removeFeature(const QString &feature);
+
+    /**
+     * Sets the list of features to @p features.
+     */
+    void setFeatures(const QStringList &features);
+
+    /**
+     * Returns the language of the text present in other properties of this 
object.
+     */
+    Q_REQUIRED_RESULT QString language() const;
+
+    /**
+     * Sets the language to @p language.
+     */
+    void setLanguage(const QString &language);
+
+    /**
+      Sets this conference equal to @p conference.
+
+      @param conference is the conference to copy.
+    */
+    Conference &operator=(const Conference &conference);
+
+    /**
+      Adds a custom property. If the property already exists it will be 
overwritten.
+      @param xname is the name of the property.
+      @param xvalue is its value.
+    */
+    void setCustomProperty(const QByteArray &xname, const QString &xvalue);
+
+    /**
+      Returns a reference to the CustomProperties object
+    */
+    Q_REQUIRED_RESULT CustomProperties &customProperties();
+
+    /**
+      Returns a const reference to the CustomProperties object
+    */
+    const CustomProperties &customProperties() const;
+
+private:
+    //@cond PRIVATE
+    class Private;
+    QSharedDataPointer<Private> d;
+    //@endcond
+
+    friend KCALENDARCORE_EXPORT QDataStream &operator<<(QDataStream &, const 
KCalendarCore::Conference &);
+    friend KCALENDARCORE_EXPORT QDataStream &operator>>(QDataStream &, 
KCalendarCore::Conference &);
+};
+
+/**
+  Serializes a Conference object into a data stream.
+  @param stream is a QDataStream.
+  @param conference is a reference to a Conference object to be serialized.
+*/
+KCALENDARCORE_EXPORT QDataStream &operator<<(QDataStream &stream, const 
KCalendarCore::Conference &conference);
+
+/**
+  Initializes a Conference object from a data stream.
+  @param stream is a QDataStream.
+  @param conference is a reference to a Conference object to be initialized.
+*/
+KCALENDARCORE_EXPORT QDataStream &operator>>(QDataStream &stream, 
KCalendarCore::Conference &conference);
+
+}
+
+//@cond PRIVATE
+Q_DECLARE_TYPEINFO(KCalendarCore::Conference, Q_MOVABLE_TYPE);
+Q_DECLARE_METATYPE(KCalendarCore::Conference)
+//@endcond
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/src/icalformat_p.cpp 
new/kcalendarcore-5.77.0/src/icalformat_p.cpp
--- old/kcalendarcore-5.76.0/src/icalformat_p.cpp       2020-11-08 
15:41:47.000000000 +0100
+++ new/kcalendarcore-5.77.0/src/icalformat_p.cpp       2020-12-05 
11:03:04.000000000 +0100
@@ -530,6 +530,14 @@
         icalcomponent_add_property(parent, icalproperty_new_class(secClass));
     }
 
+#if defined(USE_ICAL_3)
+    // color
+    if (!incidence->color().isEmpty()) {
+        icalcomponent_add_property(
+            parent, 
icalproperty_new_color(incidence->color().toUtf8().constData()));
+    }
+#endif
+
     // geo
     if (incidence->hasGeo()) {
         icalgeotype geo;
@@ -620,6 +628,14 @@
         icalcomponent_add_component(parent, writeAlarm(*it));
     }
 
+#if defined(USE_ICAL_3)
+    // conferences
+    const auto conferences = incidence->conferences();
+    for (const auto &conf : conferences) {
+        icalcomponent_add_property(parent, writeConference(conf));
+    }
+#endif
+
     // duration
     if (incidence->hasDuration()) {
         icaldurationtype duration;
@@ -1156,6 +1172,18 @@
     return a;
 }
 
+#if defined(USE_ICAL_3)
+icalproperty *ICalFormatImpl::writeConference(const Conference &conference)
+{
+    icalproperty *p = 
icalproperty_new_conference(conference.uri().toString().toUtf8().constData());
+    icalproperty_set_parameter_from_string(p, "VALUE", "URI");
+    icalproperty_set_parameter_from_string(p, "FEATURE", 
conference.features().join(QLatin1Char(',')).toUtf8().constData());
+    icalproperty_set_parameter_from_string(p, "LABEL", 
conference.label().toUtf8().constData());
+
+    return p;
+}
+#endif
+
 Todo::Ptr ICalFormatImpl::readTodo(icalcomponent *vtodo, const 
ICalTimeZoneCache *tzlist)
 {
     Todo::Ptr todo(new Todo);
@@ -1881,6 +1909,12 @@
             incidence->addAttachment(readAttachment(p));
             break;
 
+#if defined(USE_ICAL_3)
+        case ICAL_COLOR_PROPERTY:
+            incidence->setColor(QString::fromUtf8(icalproperty_get_color(p)));
+            break;
+#endif
+
         default:
             // TODO: do something about unknown properties?
             break;
@@ -1914,6 +1948,18 @@
         readAlarm(alarm, incidence);
     }
 
+#if defined(USE_ICAL_3)
+    // iterate through all conferences
+    Conference::List conferences;
+    for (auto *conf = icalcomponent_get_first_property(parent, 
ICAL_CONFERENCE_PROPERTY);
+            conf;
+            conf = icalcomponent_get_next_property(parent, 
ICAL_CONFERENCE_PROPERTY)) {
+        conferences.push_back(readConference(conf));
+    }
+    incidence->setConferences(conferences);
+#endif
+
+
     if (d->mCompat) {
         // Fix incorrect alarm settings by other applications (like outloook 9)
         d->mCompat->fixAlarms(incidence);
@@ -2319,6 +2365,18 @@
     return t;
 }
 
+#if defined(USE_ICAL_3)
+Conference ICalFormatImpl::readConference(icalproperty *prop)
+{
+    Conference conf;
+    conf.setUri(QUrl(QString::fromUtf8(icalproperty_get_conference(prop))));
+    conf.setLabel(QString::fromUtf8(icalproperty_get_parameter_as_string(prop, 
"LABEL")));
+    
conf.setFeatures(QString::fromUtf8(icalproperty_get_parameter_as_string(prop, 
"FEATURE")).split(QLatin1Char(',')));
+    
conf.setLanguage(QString::fromUtf8(icalproperty_get_parameter_as_string(prop, 
"LANGUAGE")));
+    return conf;
+}
+#endif
+
 icaltimetype ICalFormatImpl::writeICalDate(const QDate &date)
 {
     icaltimetype t = icaltime_null_time();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/src/icalformat_p.h 
new/kcalendarcore-5.77.0/src/icalformat_p.h
--- old/kcalendarcore-5.76.0/src/icalformat_p.h 2020-11-08 15:41:47.000000000 
+0100
+++ new/kcalendarcore-5.77.0/src/icalformat_p.h 2020-12-05 11:03:04.000000000 
+0100
@@ -39,6 +39,7 @@
 class Alarm;
 class Attachment;
 class Attendee;
+class Conference;
 class Duration;
 class Event;
 class FreeBusy;
@@ -122,6 +123,9 @@
     icalproperty *writeRecurrenceRule(Recurrence *);
     icalrecurrencetype writeRecurrenceRule(RecurrenceRule *recur);
     icalcomponent *writeAlarm(const Alarm::Ptr &alarm);
+#if defined(USE_ICAL_3)
+    icalproperty *writeConference(const Conference &conference);
+#endif
 
     QString extractErrorProperty(icalcomponent *);
     Todo::Ptr readTodo(icalcomponent *vtodo, const ICalTimeZoneCache *tzList);
@@ -136,6 +140,9 @@
     void readExceptionRule(icalproperty *rrule, const Incidence::Ptr 
&incidence);
     void readRecurrence(const struct icalrecurrencetype &r, RecurrenceRule 
*recur);
     void readAlarm(icalcomponent *alarm, const Incidence::Ptr &incidence);
+#if defined(USE_ICAL_3)
+    Conference readConference(icalproperty *conference);
+#endif
 
     /**
       Returns the PRODID string loaded from calendar file.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/src/incidence.cpp 
new/kcalendarcore-5.77.0/src/incidence.cpp
--- old/kcalendarcore-5.76.0/src/incidence.cpp  2020-11-08 15:41:47.000000000 
+0100
+++ new/kcalendarcore-5.77.0/src/incidence.cpp  2020-12-05 11:03:04.000000000 
+0100
@@ -66,6 +66,7 @@
         , mSchedulingID(p.mSchedulingID)
         , mRelatedToUid(p.mRelatedToUid)
         , mRecurrenceId(p.mRecurrenceId)
+        , mConferences(p.mConferences)
         , mGeoLatitude(p.mGeoLatitude)
         , mGeoLongitude(p.mGeoLongitude)
         , mRecurrence(nullptr)
@@ -73,6 +74,7 @@
         , mPriority(p.mPriority)
         , mStatus(p.mStatus)
         , mSecrecy(p.mSecrecy)
+        , mColor(p.mColor)
         , mDescriptionIsRich(p.mDescriptionIsRich)
         , mSummaryIsRich(p.mSummaryIsRich)
         , mLocationIsRich(p.mLocationIsRich)
@@ -108,6 +110,7 @@
         mGeoLongitude = src.d->mGeoLongitude;
         mHasGeo = src.d->mHasGeo;
         mRecurrenceId = src.d->mRecurrenceId;
+        mConferences = src.d->mConferences;
         mThisAndFuture = src.d->mThisAndFuture;
         mLocalOnly = src.d->mLocalOnly;
 
@@ -142,6 +145,7 @@
     QString mSchedulingID;              // ID for scheduling mails
     QMap<RelType, QString> mRelatedToUid; // incidence uid this is related to, 
for each relType
     QDateTime mRecurrenceId;            // recurrenceId
+    Conference::List mConferences;      // conference list
 
     float mGeoLatitude;                 // Specifies latitude in decimal 
degrees
     float mGeoLongitude;                // Specifies longitude in decimal 
degrees
@@ -150,6 +154,7 @@
     int mPriority;                      // priority: 1 = highest, 2 = less, 
etc.
     Status mStatus;                     // status
     Secrecy mSecrecy;                   // secrecy
+    QString mColor;                     // background color
     bool mDescriptionIsRich = false;            // description string is 
richtext.
     bool mSummaryIsRich = false;                // summary string is richtext.
     bool mLocationIsRich = false;               // location string is richtext.
@@ -284,8 +289,10 @@
         && secrecy() == i2->secrecy()
         && priority() == i2->priority()
         && stringCompare(location(), i2->location())
+        && stringCompare(color(), i2->color())
         && stringCompare(schedulingID(), i2->schedulingID())
         && recurrenceId() == i2->recurrenceId()
+        && conferences() == i2->conferences()
         && thisAndFuture() == i2->thisAndFuture();
 }
 
@@ -542,6 +549,24 @@
     return d->mRelatedToUid.value(relType);
 }
 
+void Incidence::setColor(const QString &colorName)
+{
+    if (mReadOnly) {
+        return;
+    }
+    if (!stringCompare(d->mColor, colorName)) {
+        update();
+        d->mColor = colorName;
+        setFieldDirty(FieldColor);
+        updated();
+    }
+}
+
+QString Incidence::color() const
+{
+    return d->mColor;
+}
+
 // %%%%%%%%%%%%  Recurrence-related methods %%%%%%%%%%%%%%%%%%%%
 
 Recurrence *Incidence::recurrence() const
@@ -873,6 +898,35 @@
     return false;
 }
 
+Conference::List Incidence::conferences() const
+{
+    return d->mConferences;
+}
+
+void Incidence::addConference(const Conference &conference)
+{
+    update();
+    d->mConferences.push_back(conference);
+    setFieldDirty(FieldConferences);
+    updated();
+}
+
+void Incidence::setConferences(const Conference::List &conferences)
+{
+    update();
+    d->mConferences = conferences;
+    setFieldDirty(FieldConferences);
+    updated();
+}
+
+void Incidence::clearConferences()
+{
+    update();
+    d->mConferences.clear();
+    setFieldDirty(FieldConferences);
+    updated();
+}
+
 void Incidence::setLocation(const QString &location, bool isRich)
 {
     if (mReadOnly) {
@@ -1080,7 +1134,8 @@
     serializeQDateTimeAsKDateTime(out, d->mRecurrenceId);
     out << d->mThisAndFuture
         << d->mLocalOnly << d->mStatus << d->mSecrecy << (d->mRecurrence ? 
true : false)
-        << d->mAttachments.count() << d->mAlarms.count() << d->mRelatedToUid;
+        << d->mAttachments.count() << d->mAlarms.count() << 
d->mConferences.count()
+        << d->mRelatedToUid;
 
     if (d->mRecurrence) {
         out << d->mRecurrence;
@@ -1093,13 +1148,17 @@
     for (const Alarm::Ptr &alarm : qAsConst(d->mAlarms)) {
         out << alarm;
     }
+
+    for (const Conference &conf : qAsConst(d->mConferences)) {
+        out << conf;
+    }
 }
 
 void Incidence::deserialize(QDataStream &in)
 {
     quint32 status, secrecy;
     bool hasRecurrence;
-    int attachmentCount, alarmCount;
+    int attachmentCount, alarmCount, conferencesCount;
     QMap<int, QString> relatedToUid;
     deserializeKDateTimeAsQDateTime(in, d->mCreated);
     in >> d->mRevision >> d->mDescription >> d->mDescriptionIsRich >> 
d->mSummary
@@ -1108,7 +1167,7 @@
     >> d->mGeoLatitude >> d->mGeoLongitude >> d->mHasGeo;
     deserializeKDateTimeAsQDateTime(in, d->mRecurrenceId);
     in >> d->mThisAndFuture
-    >> d->mLocalOnly >> status >> secrecy >> hasRecurrence >> attachmentCount 
>> alarmCount
+    >> d->mLocalOnly >> status >> secrecy >> hasRecurrence >> attachmentCount 
>> alarmCount >> conferencesCount
     >> relatedToUid;
 
     if (hasRecurrence) {
@@ -1119,6 +1178,7 @@
 
     d->mAttachments.clear();
     d->mAlarms.clear();
+    d->mConferences.clear();
 
     d->mAttachments.reserve(attachmentCount);
     for (int i = 0; i < attachmentCount; ++i) {
@@ -1134,6 +1194,13 @@
         d->mAlarms.append(alarm);
     }
 
+    d->mConferences.reserve(conferencesCount);
+    for (int i = 0; i < conferencesCount; ++i) {
+        Conference conf;
+        in >> conf;
+        d->mConferences.push_back(conf);
+    }
+
     d->mStatus = static_cast<Incidence::Status>(status);
     d->mSecrecy = static_cast<Incidence::Secrecy>(secrecy);
 
@@ -1145,10 +1212,25 @@
     }
 }
 
-QVariantList Incidence::attachmentsVariant() const
+namespace {
+template<typename T>
+QVariantList toVariantList(int size, typename QVector<T>::ConstIterator begin, 
typename QVector<T>::ConstIterator end)
 {
     QVariantList l;
-    l.reserve(d->mAttachments.size());
-    std::transform(d->mAttachments.begin(), d->mAttachments.end(), 
std::back_inserter(l), [](const Attachment &att) { return 
QVariant::fromValue(att); });
+    l.reserve(size);
+    std::transform(begin, end, std::back_inserter(l), [](const T &val) { 
return QVariant::fromValue(val); });
     return l;
 }
+
+} // namespace
+
+
+QVariantList Incidence::attachmentsVariant() const
+{
+    return toVariantList<Attachment>(d->mAttachments.size(), 
d->mAttachments.cbegin(), d->mAttachments.cend());
+}
+
+QVariantList Incidence::conferencesVariant() const
+{
+    return toVariantList<Conference>(d->mConferences.size(), 
d->mConferences.cbegin(), d->mConferences.cend());
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/src/incidence.h 
new/kcalendarcore-5.77.0/src/incidence.h
--- old/kcalendarcore-5.76.0/src/incidence.h    2020-11-08 15:41:47.000000000 
+0100
+++ new/kcalendarcore-5.77.0/src/incidence.h    2020-12-05 11:03:04.000000000 
+0100
@@ -23,6 +23,7 @@
 #include "attachment.h"
 #include "incidencebase.h"
 #include "recurrence.h"
+#include "conference.h"
 
 #include <QMetaType>
 
@@ -69,6 +70,7 @@
     Q_PROPERTY(KCalendarCore::Incidence::Secrecy secrecy READ secrecy WRITE 
setSecrecy)
     Q_PROPERTY(KCalendarCore::Incidence::Status status READ status WRITE 
setStatus)
     Q_PROPERTY(QVariantList attachments READ attachmentsVariant)
+    Q_PROPERTY(QVariantList conferences READ conferencesVariant)
 public:
 
     /**
@@ -397,6 +399,22 @@
     */
     Q_REQUIRED_RESULT QString relatedTo(RelType relType = RelTypeParent) const;
 
+    /**
+      Set the incidence color, as added in RFC7986.
+
+      @param colorName a named color as defined in CSS3 color name, see
+       https://www.w3.org/TR/css-color-3/#svg-color.
+      @since: 5.76
+     */
+    void setColor(const QString &colorName);
+
+    /**
+      Returns the color, if any is defined, for this incidence.
+
+      @since: 5.76
+     */
+    Q_REQUIRED_RESULT QString color() const;
+
 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 // %%%%%  Convenience wrappers for property handling
 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -736,6 +754,39 @@
     */
     Q_REQUIRED_RESULT bool hasEnabledAlarms() const;
 
+
+// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+// %%%%% Conferences-related method
+// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+    /**
+     * Returns list of all incidence conferencing methods.
+     * @since 5.77
+     */
+    Q_REQUIRED_RESULT Conference::List conferences() const;
+
+    /**
+     * Replaces all conferences in the incidence with given @p conferences
+     *
+     * @param conferences New conferences to store in the incidence.
+     * @since 5.77
+     */
+    void setConferences(const Conference::List &conferences);
+
+    /**
+     * Adds a conference to the incidence.
+     *
+     * @param conferene A conference to add.
+     * @since 5.77
+     */
+    void addConference(const Conference &conference);
+
+    /**
+     * Removes all conferences from the incidence.
+     * @since 5.77
+     */
+    void clearConferences();
+
 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 // %%%%%  Other methods
 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -842,6 +893,7 @@
     Incidence &operator=(const Incidence &other);
 
     Q_DECL_HIDDEN QVariantList attachmentsVariant() const;
+    Q_DECL_HIDDEN QVariantList conferencesVariant() const;
 
     //@cond PRIVATE
     class Private;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/src/incidencebase.h 
new/kcalendarcore-5.77.0/src/incidencebase.h
--- old/kcalendarcore-5.76.0/src/incidencebase.h        2020-11-08 
15:41:47.000000000 +0100
+++ new/kcalendarcore-5.77.0/src/incidencebase.h        2020-12-05 
11:03:04.000000000 +0100
@@ -185,7 +185,9 @@
         FieldComment,         ///> Field representing the COMMENT component.
         FieldUid,             ///> Field representing the UID component.
         FieldUnknown,         ///> Something changed. Always set when you use 
the assignment operator.
-        FieldUrl              ///> Field representing the URL component.
+        FieldUrl,             ///> Field representing the URL component.
+        FieldConferences,     ///> Field representing the CONFERENCE component.
+        FieldColor            ///> Field representing the COLOR component.
     };
 
     /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/src/memorycalendar.h 
new/kcalendarcore-5.77.0/src/memorycalendar.h
--- old/kcalendarcore-5.76.0/src/memorycalendar.h       2020-11-08 
15:41:47.000000000 +0100
+++ new/kcalendarcore-5.77.0/src/memorycalendar.h       2020-12-05 
11:03:04.000000000 +0100
@@ -291,7 +291,7 @@
       @param to is the ending timestamp.
       @return the list of Alarms occurring before the specified QDateTime.
     */
-    Q_REQUIRED_RESULT Alarm::List alarmsTo(const QDateTime &to) const;
+    Q_REQUIRED_RESULT Alarm::List alarmsTo(const QDateTime &to) const; // TODO 
KF6 remove, already defined in Calendar
 
     /**
       @copydoc Calendar::incidenceUpdate(const QString &,const QDateTime &)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.76.0/src/recurrencerule.cpp 
new/kcalendarcore-5.77.0/src/recurrencerule.cpp
--- old/kcalendarcore-5.76.0/src/recurrencerule.cpp     2020-11-08 
15:41:47.000000000 +0100
+++ new/kcalendarcore-5.77.0/src/recurrencerule.cpp     2020-12-05 
11:03:04.000000000 +0100
@@ -1772,7 +1772,7 @@
         return result;
     }
 
-    QDateTime st = start;
+    QDateTime st = start < d->mDateStart ? d->mDateStart : start;
     bool done = false;
     if (d->mDuration > 0) {
         if (!d->mCached) {
_______________________________________________
openSUSE Commits mailing list -- [email protected]
To unsubscribe, email [email protected]
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/[email protected]

Reply via email to