Hello community, here is the log from the commit of package syndication for openSUSE:Leap:15.2 checked in at 2020-02-16 18:27:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/syndication (Old) and /work/SRC/openSUSE:Leap:15.2/.syndication.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "syndication" Sun Feb 16 18:27:42 2020 rev:55 rq:773965 version:5.67.0 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/syndication/syndication.changes 2020-01-19 15:49:44.513782863 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.syndication.new.26092/syndication.changes 2020-02-16 18:28:42.774730328 +0100 @@ -1,0 +2,15 @@ +Sun Feb 2 18:07:21 UTC 2020 - Christophe Giboudeaux <[email protected]> + +- Replace %make_jobs with %cmake_build. + +------------------------------------------------------------------- +Sun Feb 2 14:33:09 UTC 2020 - Christophe Giboudeaux <[email protected]> + +- Update to 5.67.0 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/kde-frameworks-5.67.0.php +- Changes since 5.66.0: + * [Syndication] Port QRegExp to QRegularExpression + +------------------------------------------------------------------- Old: ---- syndication-5.66.0.tar.xz syndication-5.66.0.tar.xz.sig New: ---- syndication-5.67.0.tar.xz syndication-5.67.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ syndication.spec ++++++ --- /var/tmp/diff_new_pack.4irONv/_old 2020-02-16 18:28:43.054730475 +0100 +++ /var/tmp/diff_new_pack.4irONv/_new 2020-02-16 18:28:43.058730477 +0100 @@ -17,14 +17,14 @@ %define lname libKF5Syndication5 -%define _tar_path 5.66 +%define _tar_path 5.67 # 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: syndication -Version: 5.66.0 +Version: 5.67.0 Release: 0 Summary: RSS/Atom parsing library License: LGPL-2.1-or-later @@ -72,7 +72,7 @@ %build %cmake_kf5 -d build -- -DBUILD_TESTING=ON -DKF5_INCLUDE_INSTALL_DIR=%{_kf5_includedir} - %make_jobs + %cmake_build %install %kf5_makeinstall -C build ++++++ syndication-5.66.0.tar.xz -> syndication-5.67.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/syndication-5.66.0/CMakeLists.txt new/syndication-5.67.0/CMakeLists.txt --- old/syndication-5.66.0/CMakeLists.txt 2020-01-04 00:15:56.000000000 +0100 +++ new/syndication-5.67.0/CMakeLists.txt 2020-02-01 10:09:26.000000000 +0100 @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.66.0") # handled by release scripts -set(KF5_DEP_VERSION "5.66.0") # handled by release scripts +set(KF5_VERSION "5.67.0") # handled by release scripts +set(KF5_DEP_VERSION "5.67.0") # handled by release scripts project(Syndication VERSION ${KF5_VERSION}) @@ -36,7 +36,7 @@ find_package(KF5Codecs ${KF5_DEP_VERSION} CONFIG REQUIRED) add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00) -add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054100) +add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054200) option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF) add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/syndication-5.66.0/src/loader.cpp new/syndication-5.67.0/src/loader.cpp --- old/syndication-5.66.0/src/loader.cpp 2020-01-04 00:15:56.000000000 +0100 +++ new/syndication-5.67.0/src/loader.cpp 2020-02-01 10:09:26.000000000 +0100 @@ -18,7 +18,6 @@ #include <QUrl> -#include <QRegExp> #include <QStringList> #include <QDebug> #include <QFile> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/syndication-5.66.0/src/loaderutil.cpp new/syndication-5.67.0/src/loaderutil.cpp --- old/syndication-5.66.0/src/loaderutil.cpp 2020-01-04 00:15:56.000000000 +0100 +++ new/syndication-5.67.0/src/loaderutil.cpp 2020-02-01 10:09:26.000000000 +0100 @@ -22,6 +22,7 @@ #include "loaderutil_p.h" #include <QDebug> +#include <QRegularExpression> //#define DEBUG_PARSING_FEED #ifdef DEBUG_PARSING_FEED @@ -48,31 +49,33 @@ // "type[\\s]=[\\s]\\\"application/rss+xml\\\"" // "href[\\s]=[\\s]\\\"application/rss+xml\\\"" - QRegExp rx(QStringLiteral("(?:REL)[^=]*=[^sAa]*(?:service.feed|ALTERNATE)[^sAa]*[\\s]*type[^=]*=\"application/rss\\+xml\"[^s][^s](?:[^>]*)[\\s]*[\\s]*[^s]*(?:HREF)[^=]*=[^A-Z0-9-_~,./$]*([^'\">\\s]*)"), Qt::CaseInsensitive); - if (rx.indexIn(str) != -1) { - s2 = rx.cap(1); + QRegularExpression rx(QStringLiteral("(?:REL)[^=]*=[^sAa]*(?:service.feed|ALTERNATE)[^sAa]*" + "[\\s]*type[^=]*=\"application/rss\\+xml\"[^s][^s](?:[^>]*)" + "[\\s]*[\\s]*[^s]*(?:HREF)[^=]*=[^A-Z0-9-_~,./$]*([^'\">\\s]*)"), + QRegularExpression::CaseInsensitiveOption); + QRegularExpressionMatch match; + if ((match = rx.match(str)).hasMatch()) { + s2 = match.captured(1); } else { - QRegExp rx2(QStringLiteral("(?:REL)[^=]*=[^sAa]*(?:service.feed|ALTERNATE)[\\s]*[^s][^s](?:[^>]*)(?:HREF)[^=]*=[^A-Z0-9-_~,./$]*([^'\">\\s]*)"), Qt::CaseInsensitive); - if (rx2.indexIn(str) != -1) { - s2 = rx2.cap(1); + const QRegularExpression rx2(QStringLiteral("(?:REL)[^=]*=[^sAa]*(?:service.feed|ALTERNATE)" + "[\\s]*[^s][^s](?:[^>]*)(?:HREF)[^=]*=[^A-Z0-9-_~,./$]*([^'\">\\s]*)"), + QRegularExpression::CaseInsensitiveOption); + if ((match = rx2.match(str)).hasMatch()) { + s2 = match.captured(1); } else { - // does not support Atom/RSS autodiscovery.. try finding feeds by brute force.... - int pos = 0; QStringList feeds; QString host = url.host(); - rx.setPattern(QStringLiteral("(?:<A )[^H]*(?)[^=]*=[^A-Z0-9-_~,./]*([^'\">\\s]*)")); - while (pos >= 0) { - pos = rx.indexIn(str, pos); - s2 = rx.cap(1); - if (s2.endsWith(QLatin1String(".rdf")) || - s2.endsWith(QLatin1String(".rss")) || - s2.endsWith(QLatin1String(".xml"))) { + rx.setPattern(QStringLiteral("(?:<A )[^H]*(?:HREF)[^=]*=[^A-Z0-9-_~,./]*([^'\">\\s]*)")); + QRegularExpressionMatchIterator iter = rx.globalMatch(str); + while (iter.hasNext()) { + match = iter.next(); + s2 = match.captured(1); + if (s2.endsWith(QLatin1String(".rdf")) + || s2.endsWith(QLatin1String(".rss")) + || s2.endsWith(QLatin1String(".xml"))) { feeds.append(s2); } - if (pos >= 0) { - pos += rx.matchedLength(); - } } QUrl testURL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/syndication-5.66.0/src/tools.cpp new/syndication-5.67.0/src/tools.cpp --- old/syndication-5.66.0/src/tools.cpp 2020-01-04 00:15:56.000000000 +0100 +++ new/syndication-5.67.0/src/tools.cpp 2020-02-01 10:09:26.000000000 +0100 @@ -28,7 +28,7 @@ #include <QByteArray> #include <QCryptographicHash> #include <QDateTime> -#include <QRegExp> +#include <QRegularExpression> #include <QString> #include <ctime> @@ -156,21 +156,21 @@ { QString str(html); //TODO: preserve some formatting, such as line breaks - str.remove(QRegExp(QStringLiteral("<[^>]*>"))); // remove tags + str.remove(QRegularExpression(QStringLiteral("<[^>]*?>"))); // remove tags str = resolveEntities(str); return str.trimmed(); } -static QRegExp tagRegExp() +static QRegularExpression tagRegExp() { - static QRegExp exp(QStringLiteral("<\\w+.*/?>")); + static QRegularExpression exp(QStringLiteral("<\\w+.*/?>")); return exp; } bool stringContainsMarkup(const QString &str) { //check for entities - if (str.contains(QRegExp(QStringLiteral("&[a-zA-Z0-9#]+;")))) { + if (str.contains(QRegularExpression(QStringLiteral("&[a-zA-Z0-9#]+;")))) { return true; } @@ -185,7 +185,7 @@ bool isHtml(const QString &str) { //check for entities - if (str.contains(QRegExp(QStringLiteral("&[a-zA-Z0-9#]+;")))) { + if (str.contains(QRegularExpression(QStringLiteral("&[a-zA-Z0-9#]+;")))) { return true; } @@ -236,19 +236,19 @@ // look for something looking like a mail address ("[email protected]", // "<[email protected]>") and extract it - QRegExp remail(QStringLiteral("<?([^@\\s<]+@[^>\\s]+)>?")); // FIXME: user "proper" regexp, + const QRegularExpression remail(QStringLiteral("<?([^@\\s<]+@[^>\\s]+)>?")); // FIXME: user "proper" regexp, // search kmail source for it - int pos = remail.indexIn(str); - if (pos != -1) { - QString all = remail.cap(0); - email = remail.cap(1); + QRegularExpressionMatch match = remail.match(str); + if (match.hasMatch()) { + const QString all = match.captured(0); + email = match.captured(1); str.remove(all); // remove mail address } // replace "mailto", "(", ")" (to be extended) email.remove(QStringLiteral("mailto:")); - email.remove(QRegExp(QStringLiteral("[\\(\\)]"))); + email.remove(QRegularExpression(QStringLiteral("[()]"))); // simplify the rest and use it as name @@ -260,10 +260,10 @@ // str is of the format "Foo M. Bar (President)", // we should not cut anything. - QRegExp rename(QStringLiteral("^\\(([^\\)]*)\\)")); - - if (rename.exactMatch(name)) { - name = rename.cap(1); + QRegularExpression rename(QRegularExpression::anchoredPattern(QStringLiteral("^\\(([^)]*)\\)"))); + match = rename.match(name); + if (match.hasMatch()) { + name = match.captured(1); } name = name.isEmpty() ? QString() : name;
