Hello community, here is the log from the commit of package kcalendarcore for openSUSE:Factory checked in at 2020-11-19 11:49:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kcalendarcore (Old) and /work/SRC/openSUSE:Factory/.kcalendarcore.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kcalendarcore" Thu Nov 19 11:49:44 2020 rev:13 rq:848530 version:5.76.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kcalendarcore/kcalendarcore.changes 2020-10-12 13:55:20.054116898 +0200 +++ /work/SRC/openSUSE:Factory/.kcalendarcore.new.5913/kcalendarcore.changes 2020-11-23 10:31:43.569442554 +0100 @@ -1,0 +2,11 @@ +Sat Nov 7 21:34:18 UTC 2020 - Christophe Giboudeaux <[email protected]> + +- Update to 5.76.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/kde-frameworks-5.76.0 +- Changes since 5.75.0: + * Raise ambiguity in ICalFormat::toString() in tests + * Make MemoryCalendar::rawEvents(QDate, QDate) works for open bounds + +------------------------------------------------------------------- Old: ---- kcalendarcore-5.75.0.tar.xz kcalendarcore-5.75.0.tar.xz.sig New: ---- kcalendarcore-5.76.0.tar.xz kcalendarcore-5.76.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kcalendarcore.spec ++++++ --- /var/tmp/diff_new_pack.rPMAhO/_old 2020-11-23 10:31:44.165443207 +0100 +++ /var/tmp/diff_new_pack.rPMAhO/_new 2020-11-23 10:31:44.169443211 +0100 @@ -16,14 +16,14 @@ # -%define _tar_path 5.75 +%define _tar_path 5.76 # 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.75.0 +Version: 5.76.0 Release: 0 Summary: Library to access and handle calendar data License: LGPL-2.0-or-later ++++++ kcalendarcore-5.75.0.tar.xz -> kcalendarcore-5.76.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalendarcore-5.75.0/CMakeLists.txt new/kcalendarcore-5.76.0/CMakeLists.txt --- old/kcalendarcore-5.75.0/CMakeLists.txt 2020-10-04 11:47:06.000000000 +0200 +++ new/kcalendarcore-5.76.0/CMakeLists.txt 2020-11-08 15:41:47.000000000 +0100 @@ -1,11 +1,11 @@ cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.75.0") # handled by release scripts +set(KF5_VERSION "5.76.0") # handled by release scripts project(KCalendarCore VERSION ${KF5_VERSION}) # ECM setup include(FeatureSummary) -find_package(ECM 5.75.0 NO_MODULE) +find_package(ECM 5.76.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.75.0/autotests/testmemorycalendar.cpp new/kcalendarcore-5.76.0/autotests/testmemorycalendar.cpp --- old/kcalendarcore-5.75.0/autotests/testmemorycalendar.cpp 2020-10-04 11:47:06.000000000 +0200 +++ new/kcalendarcore-5.76.0/autotests/testmemorycalendar.cpp 2020-11-08 15:41:47.000000000 +0100 @@ -326,3 +326,52 @@ QVERIFY(!cal->isVisible(notebook)); QVERIFY(!cal->isVisible(event)); } + +void MemoryCalendarTest::testRawEvents() +{ + MemoryCalendar::Ptr cal(new MemoryCalendar(QTimeZone::utc())); + + Event::Ptr event = Event::Ptr(new Event()); + // This event span in 20201011T2330Z - 20201012T2330Z + event->setDtStart(QDateTime(QDate(2020, 10, 12), QTime(1, 30), + QTimeZone("Europe/Paris"))); + event->setDtEnd(QDateTime(QDate(2020, 10, 13), QTime(1, 30), + QTimeZone("Europe/Paris"))); + + QVERIFY(cal->addEvent(event)); + + // Not full-event inclusive by default, UTC timezone. + QCOMPARE(cal->rawEvents(QDate(2020, 10, 1), QDate(2020, 10, 10)).count(), 0); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 11), QDate(2020, 10, 11)).count(), 1); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 12), QDate(2020, 10, 12)).count(), 1); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 13), QDate(2020, 10, 31)).count(), 0); + QCOMPARE(cal->rawEvents(QDate(), QDate(2020, 10, 10)).count(), 0); + QCOMPARE(cal->rawEvents(QDate(), QDate(2020, 10, 11)).count(), 1); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 13), QDate()).count(), 0); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 12), QDate()).count(), 1); + + // Changing the time zone we are considering the dates in. + QCOMPARE(cal->rawEvents(QDate(2020, 10, 1), QDate(2020, 10, 11), QTimeZone("Europe/Paris")).count(), 0); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 12), QDate(2020, 10, 12), QTimeZone("Europe/Paris")).count(), 1); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 13), QDate(2020, 10, 13), QTimeZone("Europe/Paris")).count(), 1); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 14), QDate(2020, 10, 31), QTimeZone("Europe/Paris")).count(), 0); + QCOMPARE(cal->rawEvents(QDate(), QDate(2020, 10, 11), QTimeZone("Europe/Paris")).count(), 0); + QCOMPARE(cal->rawEvents(QDate(), QDate(2020, 10, 12), QTimeZone("Europe/Paris")).count(), 1); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 14), QDate(), QTimeZone("Europe/Paris")).count(), 0); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 13), QDate(), QTimeZone("Europe/Paris")).count(), 1); + + // Full event must be in the span. + QCOMPARE(cal->rawEvents(QDate(2020, 10, 1), QDate(2020, 10, 10), QTimeZone(), true).count(), 0); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 11), QDate(2020, 10, 11), QTimeZone(), true).count(), 0); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 12), QDate(2020, 10, 12), QTimeZone(), true).count(), 0); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 11), QDate(2020, 10, 12), QTimeZone(), true).count(), 1); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 13), QDate(2020, 10, 31), QTimeZone(), true).count(), 0); + QCOMPARE(cal->rawEvents(QDate(), QDate(2020, 10, 10), QTimeZone(), true).count(), 0); + QCOMPARE(cal->rawEvents(QDate(), QDate(2020, 10, 11), QTimeZone(), true).count(), 0); + QCOMPARE(cal->rawEvents(QDate(), QDate(2020, 10, 12), QTimeZone(), true).count(), 1); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 13), QDate(), QTimeZone(), true).count(), 0); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 12), QDate(), QTimeZone(), true).count(), 0); + QCOMPARE(cal->rawEvents(QDate(2020, 10, 11), QDate(), QTimeZone(), true).count(), 1); + + cal->close(); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalendarcore-5.75.0/autotests/testmemorycalendar.h new/kcalendarcore-5.76.0/autotests/testmemorycalendar.h --- old/kcalendarcore-5.75.0/autotests/testmemorycalendar.h 2020-10-04 11:47:06.000000000 +0200 +++ new/kcalendarcore-5.76.0/autotests/testmemorycalendar.h 2020-11-08 15:41:47.000000000 +0100 @@ -22,6 +22,7 @@ void testRelationsCrash(); void testRecurrenceExceptions(); void testChangeRecurId(); + void testRawEvents(); void testRawEventsForDate(); void testVisibility(); }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalendarcore-5.75.0/src/memorycalendar.cpp new/kcalendarcore-5.76.0/src/memorycalendar.cpp --- old/kcalendarcore-5.75.0/src/memorycalendar.cpp 2020-10-04 11:47:06.000000000 +0200 +++ new/kcalendarcore-5.76.0/src/memorycalendar.cpp 2020-11-08 15:41:47.000000000 +0100 @@ -620,19 +620,19 @@ for (const auto &e: d->mIncidences[Incidence::TypeEvent]) { const auto event = e.staticCast<Event>(); QDateTime rStart = event->dtStart(); - if (nd < rStart) { + if (nd.isValid() && nd < rStart) { continue; } - if (inclusive && rStart < st) { + if (inclusive && st.isValid() && rStart < st) { continue; } if (!event->recurs()) { // non-recurring events QDateTime rEnd = event->dtEnd(); - if (rEnd < st) { + if (st.isValid() && rEnd < st) { continue; } - if (inclusive && nd < rEnd) { + if (inclusive && nd.isValid() && nd < rEnd) { continue; } } else { // recurring events @@ -648,10 +648,10 @@ if (!rEnd.isValid()) { continue; } - if (rEnd < st) { + if (st.isValid() && rEnd < st) { continue; } - if (inclusive && nd < rEnd) { + if (inclusive && nd.isValid() && nd < rEnd) { continue; } break; _______________________________________________ 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]
