Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kcalendarcore for openSUSE:Factory checked in at 2022-09-13 15:08:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kcalendarcore (Old) and /work/SRC/openSUSE:Factory/.kcalendarcore.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kcalendarcore" Tue Sep 13 15:08:14 2022 rev:36 rq:1002805 version:5.98.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kcalendarcore/kcalendarcore.changes 2022-08-15 19:59:01.397194470 +0200 +++ /work/SRC/openSUSE:Factory/.kcalendarcore.new.2083/kcalendarcore.changes 2022-09-13 15:09:47.460710493 +0200 @@ -1,0 +2,13 @@ +Tue Sep 6 07:16:45 UTC 2022 - Christophe Giboudeaux <christo...@krop.fr> + +- Update to 5.98.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/frameworks/5/5.98.0 +- Changes since 5.97.0: + * Ensure that status values are valid + * Fix building with deprecated API disabled + * Add FreeBSD Qt6 CI support + * Fix nesting of update()/updated() calls + +------------------------------------------------------------------- Old: ---- kcalendarcore-5.97.0.tar.xz kcalendarcore-5.97.0.tar.xz.sig New: ---- kcalendarcore-5.98.0.tar.xz kcalendarcore-5.98.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kcalendarcore.spec ++++++ --- /var/tmp/diff_new_pack.i1SmR1/_old 2022-09-13 15:09:47.828711529 +0200 +++ /var/tmp/diff_new_pack.i1SmR1/_new 2022-09-13 15:09:47.836711552 +0200 @@ -16,14 +16,14 @@ # -%define _tar_path 5.97 +%define _tar_path 5.98 # 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 released Name: kcalendarcore -Version: 5.97.0 +Version: 5.98.0 Release: 0 Summary: Library to access and handle calendar data License: LGPL-2.0-or-later ++++++ kcalendarcore-5.97.0.tar.xz -> kcalendarcore-5.98.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalendarcore-5.97.0/.gitlab-ci.yml new/kcalendarcore-5.98.0/.gitlab-ci.yml --- old/kcalendarcore-5.97.0/.gitlab-ci.yml 2022-08-07 14:14:21.000000000 +0200 +++ new/kcalendarcore-5.98.0/.gitlab-ci.yml 2022-09-05 11:22:50.000000000 +0200 @@ -8,3 +8,4 @@ - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-qt6.yml - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/android-qt6.yml - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/windows.yml + - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd-qt6.yml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalendarcore-5.97.0/CMakeLists.txt new/kcalendarcore-5.98.0/CMakeLists.txt --- old/kcalendarcore-5.97.0/CMakeLists.txt 2022-08-07 14:14:21.000000000 +0200 +++ new/kcalendarcore-5.98.0/CMakeLists.txt 2022-09-05 11:22:50.000000000 +0200 @@ -1,11 +1,11 @@ cmake_minimum_required(VERSION 3.16) -set(KF_VERSION "5.97.0") # handled by release scripts +set(KF_VERSION "5.98.0") # handled by release scripts project(KCalendarCore VERSION ${KF_VERSION}) # ECM setup include(FeatureSummary) -find_package(ECM 5.97.0 NO_MODULE) +find_package(ECM 5.98.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.97.0/autotests/CMakeLists.txt new/kcalendarcore-5.98.0/autotests/CMakeLists.txt --- old/kcalendarcore-5.97.0/autotests/CMakeLists.txt 2022-08-07 14:14:21.000000000 +0200 +++ new/kcalendarcore-5.98.0/autotests/CMakeLists.txt 2022-09-05 11:22:50.000000000 +0200 @@ -38,6 +38,7 @@ testperson testrecurtodo teststartdatetimesfordate + teststatus testtodo testtimesininterval testcreateddatecompat diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalendarcore-5.97.0/autotests/testicalformat.cpp new/kcalendarcore-5.98.0/autotests/testicalformat.cpp --- old/kcalendarcore-5.97.0/autotests/testicalformat.cpp 2022-08-07 14:14:21.000000000 +0200 +++ new/kcalendarcore-5.98.0/autotests/testicalformat.cpp 2022-09-05 11:22:50.000000000 +0200 @@ -375,7 +375,7 @@ const QString notebook(QString::fromLatin1("my-imported-notebook")); QVERIFY(calendar->addNotebook(notebook, true)); - QVERIFY(format.fromString(calendar, data, false, notebook)); + QVERIFY(format.fromString(calendar, data, notebook)); Event::Ptr reloadedEvent = calendar->event(event->uid(), event->recurrenceId()); QVERIFY(reloadedEvent); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalendarcore-5.97.0/autotests/teststatus.cpp new/kcalendarcore-5.98.0/autotests/teststatus.cpp --- old/kcalendarcore-5.97.0/autotests/teststatus.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/kcalendarcore-5.98.0/autotests/teststatus.cpp 2022-09-05 11:22:50.000000000 +0200 @@ -0,0 +1,62 @@ +/* + * SPDX-FileCopyrightText: 2022 Glen Ditchfield <gjditchfi...@acm.org> + * SPDX-License-Identifier: LGPL-2.0-or-later + */ + +#include "event.h" +#include "incidence.h" +#include "journal.h" +#include "todo.h" + +#include <QTest> + +using namespace KCalendarCore; + +class TestStatus: public QObject +{ + Q_OBJECT +private Q_SLOTS: + + void testOnlyValidStatusAllowed_data() + { + QTest::addColumn<Incidence::Status>("status"); + QTest::addColumn<bool>("okForEvent"); + QTest::addColumn<bool>("okForTodo"); + QTest::addColumn<bool>("okForJournal"); + + QTest::newRow("StatusNone") << Incidence::StatusNone << true << true << true; + QTest::newRow("StatusTentative") << Incidence::StatusTentative << true << false << false; + QTest::newRow("StatusConfirmed") << Incidence::StatusConfirmed << true << false << false; + QTest::newRow("StatusCompleted") << Incidence::StatusCompleted << false << true << false; + QTest::newRow("StatusNeedsAction") << Incidence::StatusNeedsAction << false << true << false; + QTest::newRow("StatusCanceled") << Incidence::StatusCanceled << true << true << true; + QTest::newRow("StatusInProcess") << Incidence::StatusInProcess << false << true << false; + QTest::newRow("StatusDraft") << Incidence::StatusDraft << false << false << true; + QTest::newRow("StatusFinal") << Incidence::StatusFinal << false << false << true; + QTest::newRow("StatusX") << Incidence::StatusX << false << false << false; + } + + void testOnlyValidStatusAllowed() + { + QFETCH(Incidence::Status, status); + QFETCH(bool, okForEvent); + QFETCH(bool, okForTodo); + QFETCH(bool, okForJournal); + + Event e; + e.setStatus(status); + QVERIFY( (e.status() == status) == okForEvent); + + Todo t; + t.setStatus(status); + QVERIFY( (t.status() == status) == okForTodo); + + Journal j; + j.setStatus(status); + QVERIFY( (j.status() == status) == okForJournal); + } +}; + +QTEST_MAIN(TestStatus) +#include "teststatus.moc" + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalendarcore-5.97.0/src/event.cpp new/kcalendarcore-5.98.0/src/event.cpp --- old/kcalendarcore-5.97.0/src/event.cpp 2022-08-07 14:14:21.000000000 +0200 +++ new/kcalendarcore-5.98.0/src/event.cpp 2022-09-05 11:22:50.000000000 +0200 @@ -36,6 +36,7 @@ public: EventPrivate() = default; explicit EventPrivate(const Incidence &); + bool validStatus(Incidence::Status) override; QDateTime mDtEnd; Event::Transparency mTransparency = Event::Opaque; @@ -49,6 +50,16 @@ : IncidencePrivate(other) { } + +bool EventPrivate::validStatus(Incidence::Status status) +{ + constexpr unsigned validSet + = 1u << Incidence::StatusNone + | 1u << Incidence::StatusTentative + | 1u << Incidence::StatusConfirmed + | 1u << Incidence::StatusCanceled; + return validSet & (1u << status); +} //@endcond Event::Event() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalendarcore-5.97.0/src/icalformat.h new/kcalendarcore-5.98.0/src/icalformat.h --- old/kcalendarcore-5.97.0/src/icalformat.h 2022-08-07 14:14:21.000000000 +0200 +++ new/kcalendarcore-5.98.0/src/icalformat.h 2022-09-05 11:22:50.000000000 +0200 @@ -73,8 +73,9 @@ */ KCALENDARCORE_DEPRECATED_VERSION(5, 97, "use fromString(const Calendar::Ptr &calendar, const QString &string, const QString ¬ebook)") bool fromString(const Calendar::Ptr &calendar, const QString &string, bool deleted, const QString ¬ebook) override; - using CalFormat::fromString; #endif + // make CalFromat::fromString(const Calendar::Ptr &calendar, const QString&, const QString&) visible here as well + using CalFormat::fromString; /** Parses a string, returning the first iCal component as an Incidence. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalendarcore-5.97.0/src/incidence.cpp new/kcalendarcore-5.98.0/src/incidence.cpp --- old/kcalendarcore-5.97.0/src/incidence.cpp 2022-08-07 14:14:21.000000000 +0200 +++ new/kcalendarcore-5.98.0/src/incidence.cpp 2022-09-05 11:22:50.000000000 +0200 @@ -121,6 +121,11 @@ mRecurrence = nullptr; } } + +bool IncidencePrivate::validStatus(Incidence::Status status) +{ + return status == Incidence::StatusNone; +} //@endcond #if KCALENDARCORE_BUILD_DEPRECATED_SINCE(5, 91) @@ -814,16 +819,21 @@ void Incidence::setStatus(Incidence::Status status) { - if (mReadOnly || status == StatusX) { + if (mReadOnly) { + qCWarning(KCALCORE_LOG) << "Attempt to set status of read-only incidence"; return; } - update(); Q_D(Incidence); - d->mStatus = status; - d->mStatusString.clear(); - setFieldDirty(FieldStatus); - updated(); + if (d->validStatus(status)) { + update(); + d->mStatus = status; + d->mStatusString.clear(); + setFieldDirty(FieldStatus); + updated(); + } else { + qCWarning(KCALCORE_LOG) << "Ignoring invalid status" << status << "for" << typeStr(); + } } void Incidence::setCustomStatus(const QString &status) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalendarcore-5.97.0/src/incidence.h new/kcalendarcore-5.98.0/src/incidence.h --- old/kcalendarcore-5.97.0/src/incidence.h 2022-08-07 14:14:21.000000000 +0200 +++ new/kcalendarcore-5.98.0/src/incidence.h 2022-09-05 11:22:50.000000000 +0200 @@ -586,7 +586,9 @@ /** Sets the incidence status to a standard #Status value. - Note that StatusX cannot be specified. + Events, Todos, and Journals each have a different set of + valid statuses. Note that StatusX cannot be specified. + Invalid statuses are logged and ignored. @param status is the incidence #Status to set. @see status(), setCustomStatus(). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalendarcore-5.97.0/src/incidence_p.h new/kcalendarcore-5.98.0/src/incidence_p.h --- old/kcalendarcore-5.97.0/src/incidence_p.h 2022-08-07 14:14:21.000000000 +0200 +++ new/kcalendarcore-5.98.0/src/incidence_p.h 2022-09-05 11:22:50.000000000 +0200 @@ -33,6 +33,8 @@ void clear(); void init(Incidence *q, const IncidencePrivate &other); + virtual bool validStatus(Incidence::Status); + QDateTime mCreated; // creation datetime QString mDescription; // description string QString mSummary; // summary string diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalendarcore-5.97.0/src/journal.cpp new/kcalendarcore-5.98.0/src/journal.cpp --- old/kcalendarcore-5.97.0/src/journal.cpp 2022-08-07 14:14:21.000000000 +0200 +++ new/kcalendarcore-5.98.0/src/journal.cpp 2022-09-05 11:22:50.000000000 +0200 @@ -27,8 +27,19 @@ //@cond PRIVATE class KCalendarCore::JournalPrivate : public IncidencePrivate { + bool validStatus(Incidence::Status) override; }; +bool JournalPrivate::validStatus(Incidence::Status status) +{ + constexpr unsigned validSet + = 1u << Incidence::StatusNone + | 1u << Incidence::StatusDraft + | 1u << Incidence::StatusFinal + | 1u << Incidence::StatusCanceled; + return validSet & (1u << status); +} + //@endcond Journal::Journal() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcalendarcore-5.97.0/src/todo.cpp new/kcalendarcore-5.98.0/src/todo.cpp --- old/kcalendarcore-5.97.0/src/todo.cpp 2022-08-07 14:14:21.000000000 +0200 +++ new/kcalendarcore-5.98.0/src/todo.cpp 2022-09-05 11:22:50.000000000 +0200 @@ -87,6 +87,8 @@ bool recurTodo(Todo *todo); void deserialize(QDataStream &in); + + bool validStatus(Incidence::Status) override; }; void TodoPrivate::setDtDue(const QDateTime dd) @@ -129,6 +131,17 @@ mPercentComplete = other.mPercentComplete; } +bool TodoPrivate::validStatus(Incidence::Status status) +{ + constexpr unsigned validSet + = 1u << Incidence::StatusNone + | 1u << Incidence::StatusNeedsAction + | 1u << Incidence::StatusCompleted + | 1u << Incidence::StatusInProcess + | 1u << Incidence::StatusCanceled; + return validSet & (1u << status); +} + //@endcond Todo::Todo() @@ -309,13 +322,13 @@ void Todo::setCompleted(const QDateTime &completed) { - update(); Q_D(Todo); - if (!d->recurTodo(this)) { + if (!d->recurTodo(this)) { // May indirectly call update()/updated(). + update(); d->setPercentComplete(100); d->setCompleted(completed); + updated(); } - updated(); if (status() != StatusNone) { setStatus(StatusCompleted); // Calls update()/updated() }