Hello community,

here is the log from the commit of package kcalendarcore for openSUSE:Factory 
checked in at 2020-04-15 20:00:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kcalendarcore (Old)
 and      /work/SRC/openSUSE:Factory/.kcalendarcore.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kcalendarcore"

Wed Apr 15 20:00:51 2020 rev:6 rq:793132 version:5.69.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kcalendarcore/kcalendarcore.changes      
2020-03-19 19:43:39.851965033 +0100
+++ /work/SRC/openSUSE:Factory/.kcalendarcore.new.2738/kcalendarcore.changes    
2020-04-15 20:02:12.773920836 +0200
@@ -1,0 +2,10 @@
+Sun Apr  5 19:45:21 UTC 2020 - Christophe Giboudeaux <christo...@krop.fr>
+
+- Update to 5.69.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/kde-frameworks-5.69.0
+- Changes since 5.68.0:
+  * fix fallback to vCalendar loading on iCalendar load failure
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ kcalendarcore.spec ++++++
--- /var/tmp/diff_new_pack.Brm7m5/_old  2020-04-15 20:02:14.261921954 +0200
+++ /var/tmp/diff_new_pack.Brm7m5/_new  2020-04-15 20:02:14.269921959 +0200
@@ -16,14 +16,14 @@
 #
 
 
-%define _tar_path 5.68
+%define _tar_path 5.69
 # 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.68.0
+Version:        5.69.0
 Release:        0
 Summary:        Library to access and handle calendar data
 License:        LGPL-2.0-or-later


++++++ kcalendarcore-5.68.0.tar.xz -> kcalendarcore-5.69.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.68.0/CMakeLists.txt 
new/kcalendarcore-5.69.0/CMakeLists.txt
--- old/kcalendarcore-5.68.0/CMakeLists.txt     2020-03-07 09:50:22.000000000 
+0100
+++ new/kcalendarcore-5.69.0/CMakeLists.txt     2020-04-05 00:33:02.000000000 
+0200
@@ -1,11 +1,11 @@
 cmake_minimum_required(VERSION 3.5)
-set(KF5_VERSION "5.68.0") # handled by release scripts
+set(KF5_VERSION "5.69.0") # handled by release scripts
 
 project(KCalendarCore VERSION ${KF5_VERSION})
 
 # ECM setup
 include(FeatureSummary)
-find_package(ECM 5.68.0  NO_MODULE)
+find_package(ECM 5.69.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.68.0/src/filestorage.cpp 
new/kcalendarcore-5.69.0/src/filestorage.cpp
--- old/kcalendarcore-5.68.0/src/filestorage.cpp        2020-03-07 
09:50:22.000000000 +0100
+++ new/kcalendarcore-5.69.0/src/filestorage.cpp        2020-04-05 
00:33:02.000000000 +0200
@@ -109,15 +109,20 @@
             productId = iCal.loadedProductId();
         } else {
             if (iCal.exception()) {
-                if (iCal.exception()->code() == Exception::CalVersion1) {
-                    // Expected non vCalendar file, but detected vCalendar
-                    qCDebug(KCALCORE_LOG) << "Fallback to VCalFormat";
+                if ((iCal.exception()->code() == Exception::ParseErrorIcal) ||
+                    (iCal.exception()->code() == Exception::CalVersion1)) {
+                    // Possible vCalendar or invalid iCalendar encountered
+                    qCDebug(KCALCORE_LOG) << d->mFileName
+                                          << " is an invalid iCalendar or 
possibly a vCalendar.";
+                    qCDebug(KCALCORE_LOG) << "Try to load it as a vCalendar";
                     VCalFormat vCal;
                     success = vCal.load(calendar(), d->mFileName);
                     productId = vCal.loadedProductId();
                     if (!success) {
                         if (vCal.exception()) {
-                            qCWarning(KCALCORE_LOG) << "Exception while 
importing:" << vCal.exception()->code();
+                            qCWarning(KCALCORE_LOG) << d->mFileName
+                                                    << " is not a valid 
vCalendar file."
+                                                    << " exception code " << 
vCal.exception()->code();
                         }
                         return false;
                     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcalendarcore-5.68.0/src/icalformat.cpp 
new/kcalendarcore-5.69.0/src/icalformat.cpp
--- old/kcalendarcore-5.68.0/src/icalformat.cpp 2020-03-07 09:50:22.000000000 
+0100
+++ new/kcalendarcore-5.69.0/src/icalformat.cpp 2020-04-05 00:33:02.000000000 
+0200
@@ -73,19 +73,24 @@
 
     QFile file(fileName);
     if (!file.open(QIODevice::ReadOnly)) {
-        qCritical() << "load error";
+        qCritical() << "load error: unable to open " << fileName;
         setException(new Exception(Exception::LoadError));
         return false;
     }
     const QByteArray text = file.readAll().trimmed();
     file.close();
 
-    if (text.isEmpty()) {
-        // empty files are valid
-        return true;
-    } else {
-        return fromRawString(calendar, text, false, fileName);
+    if (!text.isEmpty()) {
+        if (!fromRawString(calendar, text, false, fileName)) {
+            qCWarning(KCALCORE_LOG) << fileName << " is not a valid iCalendar 
file";
+            setException(new Exception(Exception::ParseErrorIcal));
+            return false;
+        }
     }
+
+    // Note: we consider empty files to be valid
+
+    return true;
 }
 
 bool ICalFormat::save(const Calendar::Ptr &calendar, const QString &fileName)


Reply via email to