Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kcalendarcore for openSUSE:Factory 
checked in at 2021-03-16 15:40:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kcalendarcore (Old)
 and      /work/SRC/openSUSE:Factory/.kcalendarcore.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kcalendarcore"

Tue Mar 16 15:40:04 2021 rev:17 rq:878785 version:5.80.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kcalendarcore/kcalendarcore.changes      
2021-02-17 18:11:32.277940504 +0100
+++ /work/SRC/openSUSE:Factory/.kcalendarcore.new.2401/kcalendarcore.changes    
2021-03-16 15:41:11.596728841 +0100
@@ -1,0 +2,11 @@
+Sun Mar  7 09:26:35 UTC 2021 - Christophe Giboudeaux <[email protected]>
+
+- Update to 5.80.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/frameworks/5/5.80.0
+- Changes since 5.79.0:
+  * Add a flag not to update the lastModified field automatically.
+  * Fix enum documentation
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ kcalendarcore.spec ++++++
--- /var/tmp/diff_new_pack.gCVhQR/_old  2021-03-16 15:41:12.796730761 +0100
+++ /var/tmp/diff_new_pack.gCVhQR/_new  2021-03-16 15:41:12.800730768 +0100
@@ -16,14 +16,14 @@
 #
 
 
-%define _tar_path 5.79
+%define _tar_path 5.80
 # 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.79.0
+Version:        5.80.0
 Release:        0
 Summary:        Library to access and handle calendar data
 License:        LGPL-2.0-or-later


++++++ kcalendarcore-5.79.0.tar.xz -> kcalendarcore-5.80.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.79.0/.gitignore 
new/kcalendarcore-5.80.0/.gitignore
--- old/kcalendarcore-5.79.0/.gitignore 2021-01-30 18:40:29.000000000 +0100
+++ new/kcalendarcore-5.80.0/.gitignore 2021-02-28 12:12:22.000000000 +0100
@@ -19,3 +19,4 @@
 *.unc-backup*
 .cmake/
 /.clang-format
+/compile_commands.json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.79.0/CMakeLists.txt 
new/kcalendarcore-5.80.0/CMakeLists.txt
--- old/kcalendarcore-5.79.0/CMakeLists.txt     2021-01-30 18:40:29.000000000 
+0100
+++ new/kcalendarcore-5.80.0/CMakeLists.txt     2021-02-28 12:12:22.000000000 
+0100
@@ -1,11 +1,11 @@
 cmake_minimum_required(VERSION 3.5)
-set(KF_VERSION "5.79.0") # handled by release scripts
+set(KF_VERSION "5.80.0") # handled by release scripts
 
 project(KCalendarCore VERSION ${KF_VERSION})
 
 # ECM setup
 include(FeatureSummary)
-find_package(ECM 5.79.0  NO_MODULE)
+find_package(ECM 5.80.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)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kcalendarcore-5.79.0/autotests/testmemorycalendar.cpp 
new/kcalendarcore-5.80.0/autotests/testmemorycalendar.cpp
--- old/kcalendarcore-5.79.0/autotests/testmemorycalendar.cpp   2021-01-30 
18:40:29.000000000 +0100
+++ new/kcalendarcore-5.80.0/autotests/testmemorycalendar.cpp   2021-02-28 
12:12:22.000000000 +0100
@@ -448,3 +448,50 @@
     QVERIFY(cal->incidence(event->uid(), exception2->recurrenceId()).isNull());
     QVERIFY(cal->incidence(event->uid()).isNull());
 }
+
+void MemoryCalendarTest::testUpdateIncidence()
+{
+    MemoryCalendar::Ptr cal(new MemoryCalendar(QTimeZone::utc()));
+
+    const QDateTime dt(QDate(2021, 02, 25), QTime(14, 0), Qt::UTC);
+    Event::Ptr event(new Event());
+    event->setCreated(dt);
+    event->setLastModified(dt);
+    event->setDtStart(dt);
+    event->setDtEnd(dt.addSecs(3600));
+
+    // Adding event to cal, makes cal an observer of event.
+    QVERIFY(cal->addIncidence(event));
+    QCOMPARE(cal->rawEventsForDate(dt).count(), 1);
+
+    QVERIFY(cal->updateLastModifiedOnChange());
+
+    const QDateTime now = QDateTime::currentDateTimeUtc();
+
+    // Any single modfication is updating the lastModified field.
+    event->setSummary(QString::fromLatin1("test"));
+    QVERIFY(event->lastModified().secsTo(now) < 5);
+
+    // Reset lastModified field.
+    event->setLastModified(dt);
+    QCOMPARE(event->lastModified(), dt);
+
+    // Any modification within a startUpdates()/endUpdates() should not touch
+    // lastModified field, before the changes are completed.
+    event->startUpdates();
+    QVERIFY(cal->rawEventsForDate(dt).isEmpty());
+    event->setSummary(QString::fromLatin1("test again"));
+    QCOMPARE(event->lastModified(), dt);
+    event->endUpdates();
+    QVERIFY(event->lastModified().secsTo(now) < 5);
+    QCOMPARE(cal->rawEventsForDate(dt).count(), 1);
+
+    // Reset lastModified field.
+    event->setLastModified(dt);
+    QCOMPARE(event->lastModified(), dt);
+
+    // Don't update lastModified on change.
+    cal->setUpdateLastModifiedOnChange(false);
+    event->setSummary(QString::fromLatin1("last test"));
+    QCOMPARE(event->lastModified(), dt);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.79.0/autotests/testmemorycalendar.h 
new/kcalendarcore-5.80.0/autotests/testmemorycalendar.h
--- old/kcalendarcore-5.79.0/autotests/testmemorycalendar.h     2021-01-30 
18:40:29.000000000 +0100
+++ new/kcalendarcore-5.80.0/autotests/testmemorycalendar.h     2021-02-28 
12:12:22.000000000 +0100
@@ -27,6 +27,7 @@
     void testRawEventsForDate();
     void testVisibility();
     void testDeleteIncidence();
+    void testUpdateIncidence();
 };
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.79.0/src/incidencebase.h 
new/kcalendarcore-5.80.0/src/incidencebase.h
--- old/kcalendarcore-5.79.0/src/incidencebase.h        2021-01-30 
18:40:29.000000000 +0100
+++ new/kcalendarcore-5.80.0/src/incidencebase.h        2021-02-28 
12:12:22.000000000 +0100
@@ -153,41 +153,41 @@
       The different types of incidence fields.
     */
     enum Field {
-        FieldDtStart,         ///> Field representing the DTSTART component.
-        FieldDtEnd,           ///> Field representing the DTEND component.
-        FieldLastModified,    ///> Field representing the LAST-MODIFIED 
component.
-        FieldDescription,     ///> Field representing the DESCRIPTION 
component.
-        FieldSummary,         ///> Field representing the SUMMARY component.
-        FieldLocation,        ///> Field representing the LOCATION component.
-        FieldCompleted,       ///> Field representing the COMPLETED component.
-        FieldPercentComplete, ///> Field representing the PERCENT-COMPLETE 
component.
-        FieldDtDue,           ///> Field representing the DUE component.
-        FieldCategories,      ///> Field representing the CATEGORIES component.
-        FieldRelatedTo,       ///> Field representing the RELATED-TO component.
-        FieldRecurrence,      ///> Field representing the EXDATE, EXRULE, 
RDATE, and RRULE components.
-        FieldAttachment,      ///> Field representing the ATTACH component.
-        FieldSecrecy,         ///> Field representing the CLASS component.
-        FieldStatus,          ///> Field representing the STATUS component.
-        FieldTransparency,    ///> Field representing the TRANSPARENCY 
component.
-        FieldResources,       ///> Field representing the RESOURCES component.
-        FieldPriority,        ///> Field representing the PRIORITY component.
-        FieldGeoLatitude,     ///> Field representing the latitude part of the 
GEO component.
-        FieldGeoLongitude,    ///> Field representing the longitude part of 
the GEO component.
-        FieldRecurrenceId,    ///> Field representing the RECURRENCE-ID 
component.
-        FieldAlarms,          ///> Field representing the VALARM component.
-        FieldSchedulingId,    ///> Field representing the X-KDE-LIBKCAL-ID 
component.
-        FieldAttendees,       ///> Field representing the ATTENDEE component.
-        FieldOrganizer,       ///> Field representing the ORGANIZER component.
-        FieldCreated,         ///> Field representing the CREATED component.
-        FieldRevision,        ///> Field representing the SEQUENCE component.
-        FieldDuration,        ///> Field representing the DURATION component.
-        FieldContact,         ///> Field representing the CONTACT component.
-        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.
-        FieldConferences,     ///> Field representing the CONFERENCE component.
-        FieldColor            ///> Field representing the COLOR component.
+        FieldDtStart,         ///< Field representing the DTSTART component.
+        FieldDtEnd,           ///< Field representing the DTEND component.
+        FieldLastModified,    ///< Field representing the LAST-MODIFIED 
component.
+        FieldDescription,     ///< Field representing the DESCRIPTION 
component.
+        FieldSummary,         ///< Field representing the SUMMARY component.
+        FieldLocation,        ///< Field representing the LOCATION component.
+        FieldCompleted,       ///< Field representing the COMPLETED component.
+        FieldPercentComplete, ///< Field representing the PERCENT-COMPLETE 
component.
+        FieldDtDue,           ///< Field representing the DUE component.
+        FieldCategories,      ///< Field representing the CATEGORIES component.
+        FieldRelatedTo,       ///< Field representing the RELATED-TO component.
+        FieldRecurrence,      ///< Field representing the EXDATE, EXRULE, 
RDATE, and RRULE components.
+        FieldAttachment,      ///< Field representing the ATTACH component.
+        FieldSecrecy,         ///< Field representing the CLASS component.
+        FieldStatus,          ///< Field representing the STATUS component.
+        FieldTransparency,    ///< Field representing the TRANSPARENCY 
component.
+        FieldResources,       ///< Field representing the RESOURCES component.
+        FieldPriority,        ///< Field representing the PRIORITY component.
+        FieldGeoLatitude,     ///< Field representing the latitude part of the 
GEO component.
+        FieldGeoLongitude,    ///< Field representing the longitude part of 
the GEO component.
+        FieldRecurrenceId,    ///< Field representing the RECURRENCE-ID 
component.
+        FieldAlarms,          ///< Field representing the VALARM component.
+        FieldSchedulingId,    ///< Field representing the X-KDE-LIBKCAL-ID 
component.
+        FieldAttendees,       ///< Field representing the ATTENDEE component.
+        FieldOrganizer,       ///< Field representing the ORGANIZER component.
+        FieldCreated,         ///< Field representing the CREATED component.
+        FieldRevision,        ///< Field representing the SEQUENCE component.
+        FieldDuration,        ///< Field representing the DURATION component.
+        FieldContact,         ///< Field representing the CONTACT component.
+        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.
+        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.79.0/src/memorycalendar.cpp 
new/kcalendarcore-5.80.0/src/memorycalendar.cpp
--- old/kcalendarcore-5.79.0/src/memorycalendar.cpp     2021-01-30 
18:40:29.000000000 +0100
+++ new/kcalendarcore-5.80.0/src/memorycalendar.cpp     2021-02-28 
12:12:22.000000000 +0100
@@ -41,7 +41,7 @@
 
 public:
     Private(MemoryCalendar *qq)
-        : q(qq), mFormat(nullptr)
+        : q(qq), mFormat(nullptr), mUpdateLastModified(true)
     {
     }
     ~Private()
@@ -51,6 +51,7 @@
     MemoryCalendar *q;
     CalFormat *mFormat;                    // calendar format
     QString mIncidenceBeingUpdated;        //  Instance identifier of 
Incidence currently being updated
+    bool mUpdateLastModified;              // Call setLastModified() on 
incidence modific ations
 
 
     /**
@@ -529,6 +530,16 @@
     return alarmList;
 }
 
+bool MemoryCalendar::updateLastModifiedOnChange() const
+{
+    return d->mUpdateLastModified;
+}
+
+void MemoryCalendar::setUpdateLastModifiedOnChange(bool update)
+{
+    d->mUpdateLastModified = update;
+}
+
 void MemoryCalendar::incidenceUpdate(const QString &uid, const QDateTime 
&recurrenceId)
 {
     Incidence::Ptr inc = incidence(uid, recurrenceId);
@@ -564,7 +575,9 @@
 
         d->mIncidenceBeingUpdated = QString();
 
-        inc->setLastModified(QDateTime::currentDateTimeUtc());
+        if (d->mUpdateLastModified) {
+            inc->setLastModified(QDateTime::currentDateTimeUtc());
+        }
         // we should probably update the revision number here,
         // or internally in the Event itself when certain things change.
         // need to verify with ical documentation.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.79.0/src/memorycalendar.h 
new/kcalendarcore-5.80.0/src/memorycalendar.h
--- old/kcalendarcore-5.79.0/src/memorycalendar.h       2021-01-30 
18:40:29.000000000 +0100
+++ new/kcalendarcore-5.80.0/src/memorycalendar.h       2021-02-28 
12:12:22.000000000 +0100
@@ -294,6 +294,25 @@
     Q_REQUIRED_RESULT Alarm::List alarmsTo(const QDateTime &to) const; // TODO 
KF6 remove, already defined in Calendar
 
     /**
+      Return true if the memory calendar is updating the lastModified field
+      of incidence owned by the calendar on any incidence change.
+
+      @since 5.80
+    */
+    bool updateLastModifiedOnChange() const;
+
+    /**
+      Govern if the memory calendar is changing the lastModified field of 
incidence
+      it owns, on incidence updates.
+
+      @param update, when true, the lastModified field of an incidence owned 
by the
+      calendar is set to the current date time on any change of the incidence.
+
+      @since 5.80
+    */
+    void setUpdateLastModifiedOnChange(bool update);
+
+    /**
       @copydoc Calendar::incidenceUpdate(const QString &,const QDateTime &)
     */
     void incidenceUpdate(const QString &uid, const QDateTime &recurrenceId) 
override;

Reply via email to