Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[kf5-kcalcore] Update to latest upstream, 5.67.0
  • Loading branch information
dcaliste committed Mar 4, 2020
1 parent 6294743 commit ea8fa9c
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 53 deletions.
118 changes: 69 additions & 49 deletions rpm/0002-Adjust-for-lower-Qt-versions.patch
@@ -1,40 +1,40 @@
From 9dc6a2a15810775f7844a6b64a71e4812d402573 Mon Sep 17 00:00:00 2001
From c4a696ad8c4b8d51f6b46638a5b83618f5e00e7a Mon Sep 17 00:00:00 2001
From: Damien Caliste <dcaliste@free.fr>
Date: Tue, 14 May 2019 11:35:15 +0200
Subject: [PATCH 2/3] Adjust for lower Qt versions.
Subject: [PATCH 1/2] Adjust for lower Qt versions.

---
CMakeLists.txt | 8 ++++----
CMakeLists.txt | 6 +++---
autotests/testmemorycalendar.cpp | 2 +-
autotests/testrecurtodo.cpp | 5 +++++
src/CMakeLists.txt | 19 ++++++++++---------
src/CMakeLists.txt | 35 ++++++++++++++++----------------
src/calendar.cpp | 1 +
src/icalformat.cpp | 1 +
src/icalformat_p.cpp | 3 +++
src/memorycalendar.cpp | 4 ++--
src/occurrenceiterator.cpp | 1 +
src/recurrence.cpp | 2 --
src/recurrence.h | 5 -----
src/recurrencerule.cpp | 32 ++++++++++++++++++++++++++++++++
src/recurrencerule.cpp | 32 +++++++++++++++++++++++++++++
src/utils_p.h | 8 ++++++++
13 files changed, 68 insertions(+), 23 deletions(-)
13 files changed, 75 insertions(+), 30 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7c76578ea..873eb2ca7 100644
index ecf1986ca..413cd71ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,19 +5,19 @@ project(KCalendarCore VERSION ${KF5_VERSION})

# ECM setup
include(FeatureSummary)
-find_package(ECM 5.64.0 NO_MODULE)
-find_package(ECM 5.67.0 NO_MODULE)
+find_package(ECM 5.44.0 NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules")
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.11.0)
-set(REQUIRED_QT_VERSION 5.12.0)
+set(REQUIRED_QT_VERSION 5.6.0)

include(KDEInstallDirs)
Expand All @@ -46,19 +46,11 @@ index 7c76578ea..873eb2ca7 100644
include(ECMGenerateHeaders)
include(ECMGeneratePriFile)

@@ -120,6 +120,6 @@ if (NOT KCALENDARCORE_NO_DEPRECATED_NAMESPACE)
)
endif()

-install(FILES kcalendarcore.renamecategories kcalendarcore.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
+#install(FILES kcalendarcore.renamecategories kcalendarcore.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})

feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff --git a/autotests/testmemorycalendar.cpp b/autotests/testmemorycalendar.cpp
index f006e6aa5..74dea4d88 100644
index 77241eb43..6a424b2f1 100644
--- a/autotests/testmemorycalendar.cpp
+++ b/autotests/testmemorycalendar.cpp
@@ -134,7 +134,7 @@ void MemoryCalendarTest::testIncidences()
@@ -121,7 +121,7 @@ void MemoryCalendarTest::testIncidences()

QVERIFY(store.load());
Todo::Ptr todo = cal->incidence(QStringLiteral("4")).staticCast<Todo>();
Expand All @@ -68,10 +60,10 @@ index f006e6aa5..74dea4d88 100644
QVERIFY(todo->locationIsRich());
cal->close();
diff --git a/autotests/testrecurtodo.cpp b/autotests/testrecurtodo.cpp
index 9ee18570b..b3b842157 100644
index a9d439888..6bacabff1 100644
--- a/autotests/testrecurtodo.cpp
+++ b/autotests/testrecurtodo.cpp
@@ -162,7 +162,12 @@ void RecurTodoTest::testRecurTodo_data()
@@ -149,7 +149,12 @@ void RecurTodoTest::testRecurTodo_data()
QTest::addColumn<QDateTime>("dtdue");

// Can't use QDateTime::currentDateTimeUtc() due to milliseconds mismatching
Expand All @@ -85,10 +77,21 @@ index 9ee18570b..b3b842157 100644
const QDateTime invalid;

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 72ab6cff9..70f46a552 100644
index b0630cdcd..92616cdf7 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -42,15 +42,16 @@ ecm_qt_declare_logging_category(kcalcore_LIB_SRCS HEADER kcalendarcore_debug.h I
@@ -41,23 +41,24 @@ ecm_qt_declare_logging_category(kcalcore_LIB_SRCS
HEADER kcalendarcore_debug.h
IDENTIFIER KCALCORE_LOG
CATEGORY_NAME org.kde.pim.kcalcore
- OLD_CATEGORY_NAMES log_kcalcore
- DESCRIPTION "kcalcore (pim lib)"
- EXPORT KCALENDARCORE
+# OLD_CATEGORY_NAMES log_kcalcore
+# DESCRIPTION "kcalcore (pim lib)"
+# EXPORT KCALENDARCORE
)

add_library(KF5CalendarCore ${kcalcore_LIB_SRCS})
add_library(KF5::CalendarCore ALIAS KF5CalendarCore)

Expand All @@ -114,11 +117,28 @@ index 72ab6cff9..70f46a552 100644

# backward compatibility with the old name
if (NOT KCALENDARCORE_NO_DEPRECATED_NAMESPACE)
@@ -163,11 +164,11 @@ if (NOT KCALENDARCORE_NO_DEPRECATED_NAMESPACE)
)
endif()

-ecm_qt_install_logging_categories(
- EXPORT KCALENDARCORE
- FILE kcalendarcore.categories
- DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
-)
+#ecm_qt_install_logging_categories(
+# EXPORT KCALENDARCORE
+# FILE kcalendarcore.categories
+# DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
+#)

ecm_generate_pri_file(BASE_NAME KCalendarCore LIB_NAME KF5CalendarCore DEPS "Core" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/KCalendarCore/KCalendarCore)
install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
diff --git a/src/calendar.cpp b/src/calendar.cpp
index 7a4569086..4f8af6de6 100644
index 267031ec5..87489a677 100644
--- a/src/calendar.cpp
+++ b/src/calendar.cpp
@@ -40,6 +40,7 @@
@@ -27,6 +27,7 @@
#include "icaltimezones_p.h"
#include "sorting.h"
#include "visitor.h"
Expand All @@ -127,10 +147,10 @@ index 7a4569086..4f8af6de6 100644
#include "kcalendarcore_debug.h"

diff --git a/src/icalformat.cpp b/src/icalformat.cpp
index 05706a5a2..5a819d1e6 100644
index 6ea563e9a..6593db302 100644
--- a/src/icalformat.cpp
+++ b/src/icalformat.cpp
@@ -35,6 +35,7 @@
@@ -22,6 +22,7 @@
#include "memorycalendar.h"
#include "kcalendarcore_debug.h"
#include "calendar_p.h"
Expand All @@ -139,18 +159,18 @@ index 05706a5a2..5a819d1e6 100644
#include <QSaveFile>
#include <QFile>
diff --git a/src/icalformat_p.cpp b/src/icalformat_p.cpp
index e146c7b4b..5824067e6 100644
index 62ab47db8..f1de95ac5 100644
--- a/src/icalformat_p.cpp
+++ b/src/icalformat_p.cpp
@@ -45,6 +45,7 @@
@@ -32,6 +32,7 @@
#include "memorycalendar.h"
#include "todo.h"
#include "visitor.h"
+#include "utils_p.h"

#include "kcalendarcore_debug.h"

@@ -2567,7 +2568,9 @@ QDateTime ICalFormatImpl::readICalDateTimeProperty(icalproperty *p, const ICalTi
@@ -2557,7 +2558,9 @@ QDateTime ICalFormatImpl::readICalDateTimeProperty(icalproperty *p, const ICalTi
break;
}
} //end of ICAL_X_PROPERTY
Expand All @@ -161,10 +181,10 @@ index e146c7b4b..5824067e6 100644
switch (kind) {
case ICAL_RDATE_PROPERTY:
diff --git a/src/memorycalendar.cpp b/src/memorycalendar.cpp
index c45448759..1e2a5d496 100644
index 7b52f502d..51cfac413 100644
--- a/src/memorycalendar.cpp
+++ b/src/memorycalendar.cpp
@@ -222,8 +222,8 @@ bool MemoryCalendar::deleteIncidence(const Incidence::Ptr &incidence)
@@ -209,8 +209,8 @@ bool MemoryCalendar::deleteIncidence(const Incidence::Ptr &incidence)
removeRelations(incidence);
const Incidence::IncidenceType type = incidence->type();
const QString uid = incidence->uid();
Expand All @@ -176,10 +196,10 @@ index c45448759..1e2a5d496 100644
// this is necessary so korganizer still has time to query for exceptions
notifyIncidenceAboutToBeDeleted(incidence);
diff --git a/src/occurrenceiterator.cpp b/src/occurrenceiterator.cpp
index ef6abe1ac..1ad428442 100644
index 82d9964f9..76b352546 100644
--- a/src/occurrenceiterator.cpp
+++ b/src/occurrenceiterator.cpp
@@ -32,6 +32,7 @@
@@ -19,6 +19,7 @@
#include "occurrenceiterator.h"
#include "calendar.h"
#include "calfilter.h"
Expand All @@ -188,18 +208,18 @@ index ef6abe1ac..1ad428442 100644
#include <QDate>

diff --git a/src/recurrence.cpp b/src/recurrence.cpp
index 080273fb6..a1b5f483d 100644
index a685a534f..7ac18ed95 100644
--- a/src/recurrence.cpp
+++ b/src/recurrence.cpp
@@ -150,7 +150,6 @@ bool Recurrence::operator==(const Recurrence &recurrence) const
@@ -137,7 +137,6 @@ bool Recurrence::operator==(const Recurrence &recurrence) const
return *d == *recurrence.d;
}

-#if KCALENDARCORE_BUILD_DEPRECATED_SINCE(5, 64)
Recurrence &Recurrence::operator=(const Recurrence &recurrence)
{
// check for self assignment
@@ -163,7 +162,6 @@ Recurrence &Recurrence::operator=(const Recurrence &recurrence)
@@ -150,7 +149,6 @@ Recurrence &Recurrence::operator=(const Recurrence &recurrence)
*d = *recurrence.d;
return *this;
}
Expand All @@ -208,10 +228,10 @@ index 080273fb6..a1b5f483d 100644
void Recurrence::addObserver(RecurrenceObserver *observer)
{
diff --git a/src/recurrence.h b/src/recurrence.h
index e6dff9317..4f9530102 100644
index 2d728c138..720a2f02b 100644
--- a/src/recurrence.h
+++ b/src/recurrence.h
@@ -146,18 +146,13 @@ public:
@@ -133,18 +133,13 @@ public:
return !operator==(r);
}

Expand All @@ -231,10 +251,10 @@ index e6dff9317..4f9530102 100644
/** Return the start date/time of the recurrence (Time for all-day recurrences will be 0:00).
@return the current start/time of the recurrence. */
diff --git a/src/recurrencerule.cpp b/src/recurrencerule.cpp
index 9fb070092..38bd6ac0f 100644
index cf009a6d9..5a70da143 100644
--- a/src/recurrencerule.cpp
+++ b/src/recurrencerule.cpp
@@ -668,19 +668,29 @@ bool Constraint::readDateTime(const QDateTime &dt, RecurrenceRule::PeriodType ty
@@ -655,19 +655,29 @@ bool Constraint::readDateTime(const QDateTime &dt, RecurrenceRule::PeriodType ty
// Really fall through! Only weekly needs to be treated differently!
case RecurrenceRule::rSecondly:
second = dt.time().second();
Expand Down Expand Up @@ -264,7 +284,7 @@ index 9fb070092..38bd6ac0f 100644
case RecurrenceRule::rYearly:
year = dt.date().year();
break;
@@ -1275,29 +1285,39 @@ void RecurrenceRule::Private::buildConstraints()
@@ -1262,29 +1272,39 @@ void RecurrenceRule::Private::buildConstraints()
mByYearDays.isEmpty() && mByMonths.isEmpty()) {
fixConstraint(setMonth, mDateStart.date().month());
}
Expand Down Expand Up @@ -304,7 +324,7 @@ index 9fb070092..38bd6ac0f 100644
case rSecondly:
default:
break;
@@ -1858,10 +1878,14 @@ Constraint RecurrenceRule::Private::getPreviousValidDateInterval(const QDateTime
@@ -1845,10 +1865,14 @@ Constraint RecurrenceRule::Private::getPreviousValidDateInterval(const QDateTime
// by the factor 60 and 60*60! Same for weekly and daily (factor 7)
case rHourly:
modifier *= 60;
Expand All @@ -319,7 +339,7 @@ index 9fb070092..38bd6ac0f 100644
case rSecondly:
periods = static_cast<int>(start.secsTo(toDate) / modifier);
// round it down to the next lower multiple of frequency:
@@ -1874,7 +1898,9 @@ Constraint RecurrenceRule::Private::getPreviousValidDateInterval(const QDateTime
@@ -1861,7 +1885,9 @@ Constraint RecurrenceRule::Private::getPreviousValidDateInterval(const QDateTime
toDate = toDate.addDays(-(7 + toDate.date().dayOfWeek() - mWeekStart) % 7);
start = start.addDays(-(7 + start.date().dayOfWeek() - mWeekStart) % 7);
modifier *= 7;
Expand All @@ -329,7 +349,7 @@ index 9fb070092..38bd6ac0f 100644
case rDaily:
periods = start.daysTo(toDate) / modifier;
// round it down to the next lower multiple of frequency:
@@ -1933,10 +1959,14 @@ Constraint RecurrenceRule::Private::getNextValidDateInterval(const QDateTime &dt
@@ -1920,10 +1946,14 @@ Constraint RecurrenceRule::Private::getNextValidDateInterval(const QDateTime &dt
// by the factor 60 and 60*60! Same for weekly and daily (factor 7)
case rHourly:
modifier *= 60;
Expand All @@ -344,7 +364,7 @@ index 9fb070092..38bd6ac0f 100644
case rSecondly:
periods = static_cast<int>(start.secsTo(toDate) / modifier);
periods = qMax(0L, periods);
@@ -1950,7 +1980,9 @@ Constraint RecurrenceRule::Private::getNextValidDateInterval(const QDateTime &dt
@@ -1937,7 +1967,9 @@ Constraint RecurrenceRule::Private::getNextValidDateInterval(const QDateTime &dt
toDate = toDate.addDays(-(7 + toDate.date().dayOfWeek() - mWeekStart) % 7);
start = start.addDays(-(7 + start.date().dayOfWeek() - mWeekStart) % 7);
modifier *= 7;
Expand All @@ -355,10 +375,10 @@ index 9fb070092..38bd6ac0f 100644
periods = start.daysTo(toDate) / modifier;
periods = qMax(0L, periods);
diff --git a/src/utils_p.h b/src/utils_p.h
index bb9025329..9075b41dd 100644
index c2ae0e3e0..b205877d3 100644
--- a/src/utils_p.h
+++ b/src/utils_p.h
@@ -42,6 +42,14 @@ void deserializeQDateTimeList(QDataStream &in, QList<QDateTime> &list);
@@ -29,6 +29,14 @@ void deserializeQDateTimeList(QDataStream &in, QList<QDateTime> &list);
void serializeQTimeZoneAsSpec(QDataStream &out, const QTimeZone &tz);
void deserializeSpecAsQTimeZone(QDataStream &in, QTimeZone &tz);

Expand Down
4 changes: 2 additions & 2 deletions rpm/0003-Add-pkgconfig-packaging.patch
Expand Up @@ -14,8 +14,8 @@ index 873eb2ca7..283415226 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -122,4 +122,15 @@ endif()

#install(FILES kcalendarcore.renamecategories kcalendarcore.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
)
endif()

+# generate pkg-config file
+set(DEST_DIR "${CMAKE_INSTALL_PREFIX}")
Expand Down
2 changes: 1 addition & 1 deletion rpm/kf5-calendarcore.spec
@@ -1,6 +1,6 @@
Name: kf5-calendarcore
Summary: KDE calendar library
Version: 5.64.0
Version: 5.67.0
Release: 1
Group: System/Libraries
License: LGPLv2
Expand Down
2 changes: 1 addition & 1 deletion upstream
Submodule upstream updated from cf68c7 to 52c0f1

0 comments on commit ea8fa9c

Please sign in to comment.