Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kholidays for openSUSE:Factory checked in at 2023-06-11 19:53:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kholidays (Old) and /work/SRC/openSUSE:Factory/.kholidays.new.15902 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kholidays" Sun Jun 11 19:53:15 2023 rev:97 rq:1091921 version:5.107.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kholidays/kholidays.changes 2023-05-14 16:32:47.535507774 +0200 +++ /work/SRC/openSUSE:Factory/.kholidays.new.15902/kholidays.changes 2023-06-11 19:55:39.707297762 +0200 @@ -1,0 +2,10 @@ +Mon Jun 5 07:43:59 UTC 2023 - Christophe Marin <[email protected]> + +- Update to 5.107.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/frameworks/5/5.107.0 +- Changes since 5.106.0: + * Significantly speed up HolidayRegion::defaultRegionCode() + +------------------------------------------------------------------- Old: ---- kholidays-5.106.0.tar.xz kholidays-5.106.0.tar.xz.sig New: ---- kholidays-5.107.0.tar.xz kholidays-5.107.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kholidays.spec ++++++ --- /var/tmp/diff_new_pack.5VYN1p/_old 2023-06-11 19:55:40.627303310 +0200 +++ /var/tmp/diff_new_pack.5VYN1p/_new 2023-06-11 19:55:40.643303407 +0200 @@ -24,7 +24,7 @@ %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')} %bcond_without released Name: kholidays -Version: 5.106.0 +Version: 5.107.0 Release: 0 Summary: Holiday calculation library License: LGPL-2.1-or-later ++++++ kholidays-5.106.0.tar.xz -> kholidays-5.107.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kholidays-5.106.0/CMakeLists.txt new/kholidays-5.107.0/CMakeLists.txt --- old/kholidays-5.106.0/CMakeLists.txt 2023-05-06 11:25:01.000000000 +0200 +++ new/kholidays-5.107.0/CMakeLists.txt 2023-06-03 11:45:59.000000000 +0200 @@ -1,9 +1,9 @@ cmake_minimum_required(VERSION 3.16) -set(KF_VERSION "5.106.0") +set(KF_VERSION "5.107.0") project(KHolidays VERSION ${KF_VERSION}) -find_package(ECM 5.106.0 REQUIRED NO_MODULE) +find_package(ECM 5.107.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) set(CMAKE_AUTORCC ON) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kholidays-5.106.0/poqm/ar/libkholidays5_qt.po new/kholidays-5.107.0/poqm/ar/libkholidays5_qt.po --- old/kholidays-5.106.0/poqm/ar/libkholidays5_qt.po 2023-05-06 11:25:01.000000000 +0200 +++ new/kholidays-5.107.0/poqm/ar/libkholidays5_qt.po 2023-06-03 11:45:59.000000000 +0200 @@ -2,7 +2,7 @@ # Language AR translations for PACKAGE package. # Automatically generated, 2007. # Youssef Chahibi <[email protected]>, 2007. -# Safa Alfulaij <[email protected]>, ٢٠١٥, ٢٠١٦, 2018. +# Safa Alfulaij <[email protected]>, 2015, 2016, 2018. # Zayed Al-Saidi <[email protected]>, 2022. msgid "" msgstr "" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kholidays-5.106.0/poqm/ja/libkholidays5_qt.po new/kholidays-5.107.0/poqm/ja/libkholidays5_qt.po --- old/kholidays-5.106.0/poqm/ja/libkholidays5_qt.po 2023-05-06 11:25:01.000000000 +0200 +++ new/kholidays-5.107.0/poqm/ja/libkholidays5_qt.po 2023-06-03 11:45:59.000000000 +0200 @@ -15,7 +15,7 @@ "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" +"Plural-Forms: nplurals=1; plural=0;\n" "X-Accelerator-Marker: &\n" "X-Text-Markup: qtrich\n" "X-Qt-Contexts: true\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kholidays-5.106.0/poqm/zh_CN/libkholidays5_qt.po new/kholidays-5.107.0/poqm/zh_CN/libkholidays5_qt.po --- old/kholidays-5.106.0/poqm/zh_CN/libkholidays5_qt.po 2023-05-06 11:25:01.000000000 +0200 +++ new/kholidays-5.107.0/poqm/zh_CN/libkholidays5_qt.po 2023-06-03 11:45:59.000000000 +0200 @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: kdeorg\n" -"PO-Revision-Date: 2023-04-29 08:34\n" +"PO-Revision-Date: 2023-05-22 14:00\n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" "MIME-Version: 1.0\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kholidays-5.106.0/src/holidayregion.cpp new/kholidays-5.107.0/src/holidayregion.cpp --- old/kholidays-5.106.0/src/holidayregion.cpp 2023-05-06 11:25:01.000000000 +0200 +++ new/kholidays-5.107.0/src/holidayregion.cpp 2023-06-03 11:45:59.000000000 +0200 @@ -1146,6 +1146,17 @@ return false; } +static bool maybeCountry(QStringView holidayId, QStringView country) +{ + if (country.isEmpty()) { + return false; + } + if (holidayId.size() < 2 || country.size() < 2 || (country.size() > 2 && country[2] != QLatin1Char('-'))) { + return true; // not the format we expect, check the content + } + return holidayId.startsWith(country.left(2)); +} + QString HolidayRegion::defaultRegionCode(const QString &country, const QString &language) { // Try to match against the users country and language, or failing that the language country. @@ -1191,6 +1202,11 @@ const QStringList regionList = KHolidays::HolidayRegion::regionCodes(); for (const QString &aRegionCode : regionList) { + // avoid expensive parsing in most cases by leveraging the country being in the file name + if (!maybeCountry(aRegionCode, localeCountry) && !maybeCountry(aRegionCode, localeLanguageCountry)) { + continue; + } + const auto hr = KHolidays::HolidayRegion(aRegionCode); QString regionCountry = hr.countryCode().toLower(); QString regionSubdivisionCountry;
