Hello community, here is the log from the commit of package kcoreaddons for openSUSE:Factory checked in at 2019-03-21 09:44:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kcoreaddons (Old) and /work/SRC/openSUSE:Factory/.kcoreaddons.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kcoreaddons" Thu Mar 21 09:44:04 2019 rev:67 rq:686726 version:5.56.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kcoreaddons/kcoreaddons.changes 2019-02-28 21:28:34.549829311 +0100 +++ /work/SRC/openSUSE:Factory/.kcoreaddons.new.28833/kcoreaddons.changes 2019-03-21 09:44:37.806920628 +0100 @@ -1,0 +2,13 @@ +Sun Mar 10 20:15:35 UTC 2019 - lbeltr...@kde.org + +- Update to 5.56.0 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/kde-frameworks-5.56.0.php +- Changes since 5.55.0: + * Fix compile kpimtextedit when we remove all deprecated method against + * Port deprecated methods + * Namespace find_file call + * Create tel: links for phone numbers + +------------------------------------------------------------------- Old: ---- kcoreaddons-5.55.0.tar.xz New: ---- kcoreaddons-5.56.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kcoreaddons.spec ++++++ --- /var/tmp/diff_new_pack.fDagz6/_old 2019-03-21 09:44:39.270920291 +0100 +++ /var/tmp/diff_new_pack.fDagz6/_new 2019-03-21 09:44:39.294920285 +0100 @@ -17,14 +17,14 @@ %define lname libKF5CoreAddons5 -%define _tar_path 5.55 +%define _tar_path 5.56 # 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: kcoreaddons -Version: 5.55.0 +Version: 5.56.0 Release: 0 Summary: Utilities for core application functionality and accessing the OS License: LGPL-2.1-or-later ++++++ kcoreaddons-5.55.0.tar.xz -> kcoreaddons-5.56.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.55.0/CMakeLists.txt new/kcoreaddons-5.56.0/CMakeLists.txt --- old/kcoreaddons-5.55.0/CMakeLists.txt 2019-02-03 00:54:52.000000000 +0100 +++ new/kcoreaddons-5.56.0/CMakeLists.txt 2019-03-02 14:36:22.000000000 +0100 @@ -1,10 +1,10 @@ cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.55.0") # handled by release scripts +set(KF5_VERSION "5.56.0") # handled by release scripts project(KCoreAddons VERSION ${KF5_VERSION}) include(FeatureSummary) -find_package(ECM 5.55.0 NO_MODULE) +find_package(ECM 5.56.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/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/kcoreaddons-5.55.0/KF5CoreAddonsConfig.cmake.in new/kcoreaddons-5.56.0/KF5CoreAddonsConfig.cmake.in --- old/kcoreaddons-5.55.0/KF5CoreAddonsConfig.cmake.in 2019-02-03 00:54:52.000000000 +0100 +++ new/kcoreaddons-5.56.0/KF5CoreAddonsConfig.cmake.in 2019-03-02 14:36:22.000000000 +0100 @@ -6,11 +6,11 @@ @PACKAGE_SETUP_AUTOMOC_VARIABLES@ if(CMAKE_CROSSCOMPILING AND KF5_HOST_TOOLING) - find_file(TARGETSFILE KF5CoreAddons/KF5CoreAddonsToolingTargets.cmake + find_file(KCOREADDONS_TARGETSFILE KF5CoreAddons/KF5CoreAddonsToolingTargets.cmake PATHS ${KF5_HOST_TOOLING} ${CMAKE_CURRENT_LIST_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) - include("${TARGETSFILE}") + include("${KCOREADDONS_TARGETSFILE}") else() include("${CMAKE_CURRENT_LIST_DIR}/KF5CoreAddonsToolingTargets.cmake") if(CMAKE_CROSSCOMPILING AND DESKTOPTOJSON_EXECUTABLE) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.55.0/autotests/ktexttohtmltest.cpp new/kcoreaddons-5.56.0/autotests/ktexttohtmltest.cpp --- old/kcoreaddons-5.55.0/autotests/ktexttohtmltest.cpp 2019-02-03 00:54:52.000000000 +0100 +++ new/kcoreaddons-5.56.0/autotests/ktexttohtmltest.cpp 2019-03-02 14:36:22.000000000 +0100 @@ -439,6 +439,59 @@ << KTextToHTML::Options(KTextToHTML::PreserveSpaces) << "@@ -55,6 +55,10 @@ xsi:schemaLocation="<a href=\"http://www.kde.org/standards/kcfg/1.0\">http://www.kde.org/standards/kcfg/1.0</a> <a href=\"http://www.kde.org/\">http://www.kde.org/</a>"; + const auto opt = KTextToHTML::PreserveSpaces | KTextToHTML::ConvertPhoneNumbers; + // tel: urls + QTest::newRow("tel url compact") << "bla bla <tel:+491234567890> bla bla" << opt + << "bla bla <<a href=\"tel:+491234567890\">tel:+491234567890</a>> bla bla"; + QTest::newRow("tel url fancy") << "bla bla tel:+49-321-123456 bla bla" << opt + << "bla bla <a href=\"tel:+49-321-123456\">tel:+49-321-123456</a> bla bla"; + + // negative tel: url tests + QTest::newRow("empty tel url") << "bla tel: blub" << opt + << "bla tel: blub"; + + // phone numbers + QTest::newRow("tel compact international") << "call +49123456789, then hang up" << opt + << "call <a href=\"tel:+49123456789\">+49123456789</a>, then hang up"; + QTest::newRow("tel parenthesis/spaces international") << "phone:+33 (01) 12 34 56 78 blub" << opt + << "phone:<a href=\"tel:+330112345678\">+33 (01) 12 34 56 78</a> blub"; + QTest::newRow("tel dashes international") << "bla +44-321-1-234-567" << opt + << "bla <a href=\"tel:+443211234567\">+44-321-1-234-567</a>"; + QTest::newRow("tel dashes/spaces international") << "+1 123-456-7000 blub" << opt + << "<a href=\"tel:+11234567000\">+1 123-456-7000</a> blub"; + QTest::newRow("tel spaces international") << "bla +32 1 234 5678 blub" << opt + << "bla <a href=\"tel:+3212345678\">+32 1 234 5678</a> blub"; + QTest::newRow("tel slash domestic") << "bla 030/12345678 blub" << opt + << "bla <a href=\"tel:03012345678\">030/12345678</a> blub"; + QTest::newRow("tel slash/space domestic") << "Tel.: 089 / 12 34 56 78" << opt + << "Tel.: <a href=\"tel:08912345678\">089 / 12 34 56 78</a>"; + QTest::newRow("tel follow by parenthesis") << "Telefon: 0 18 05 / 12 23 46 (14 Cent/Min.*)" << opt + << "Telefon: <a href=\"tel:01805122346\">0 18 05 / 12 23 46</a> (14 Cent/Min.*)"; + QTest::newRow("tel space single digit at end") << "0123/123 456 7" << opt + << "<a href=\"tel:01231234567\">0123/123 456 7</a>"; + QTest::newRow("tel space around dash") << "bla +49 (0) 12 23 - 45 6000 blub" << opt + << "bla <a href=\"tel:+4901223456000\">+49 (0) 12 23 - 45 6000</a> blub"; + QTest::newRow("tel two numbers speparated by dash") << "bla +49 (0) 12 23 46 78 - +49 0123/123 456 78 blub" << opt + << "bla <a href=\"tel:+49012234678\">+49 (0) 12 23 46 78</a> - <a href=\"tel:+49012312345678\">+49 0123/123 456 78</a> blub"; + + // negative tests for phone numbers + QTest::newRow("non-tel number") << "please send 1200 cakes" << opt + << "please send 1200 cakes"; + QTest::newRow("non-tel alpha-numeric") << "bla 1-123-456-ABCD blub" << opt + << "bla 1-123-456-ABCD blub"; + QTest::newRow("non-tel alpha prefix") << "ABCD0123-456-789" << opt + << "ABCD0123-456-789"; + QTest::newRow("non-tel date") << "bla 02/03/2019 blub" << opt + << "bla 02/03/2019 blub"; + QTest::newRow("non-tel too long") << "bla +012-4567890123456 blub" << opt + << "bla +012-4567890123456 blub"; + QTest::newRow("non-tel unbalanced") << "bla +012-456789(01 blub" << opt + << "bla +012-456789(01 blub"; + QTest::newRow("non-tel nested") << "bla +012-4(56(78)90)1 blub" << opt + << "bla +012-4(56(78)90)1 blub"; + QTest::newRow("tel extraction disabled") << "call +49123456789 now" + << KTextToHTML::Options(KTextToHTML::PreserveSpaces) + << "call +49123456789 now"; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.55.0/po/da/kcoreaddons5_qt.po new/kcoreaddons-5.56.0/po/da/kcoreaddons5_qt.po --- old/kcoreaddons-5.55.0/po/da/kcoreaddons5_qt.po 2019-02-03 00:54:52.000000000 +0100 +++ new/kcoreaddons-5.56.0/po/da/kcoreaddons5_qt.po 2019-03-02 14:36:22.000000000 +0100 @@ -2,8 +2,6 @@ # Copyright (C) YEAR This_file_is_part_of_KDE # This file is distributed under the same license as the PACKAGE package. # -# Martin Schlander, 2008. -# Martin Schlander <mschlan...@opensuse.org>, 2008. # Martin Schlander <mschlan...@opensuse.org>, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018. # Keld Simonsen <k...@keldix.com>, 2010. msgid "" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.55.0/po/id/kcoreaddons5_qt.po new/kcoreaddons-5.56.0/po/id/kcoreaddons5_qt.po --- old/kcoreaddons-5.55.0/po/id/kcoreaddons5_qt.po 2019-02-03 00:54:52.000000000 +0100 +++ new/kcoreaddons-5.56.0/po/id/kcoreaddons5_qt.po 2019-03-02 14:36:22.000000000 +0100 @@ -16,7 +16,7 @@ "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Lokalize 2.0\n" "X-Qt-Contexts: true\n" @@ -631,6 +631,7 @@ msgid "%n millisecond(s)" msgid_plural "%n millisecond(s)" msgstr[0] "%n milidetik" +msgstr[1] "%n milidetik" #. @item:intext %n is a whole number #: lib/util/kformatprivate.cpp:446 @@ -639,6 +640,7 @@ msgid "%n day(s)" msgid_plural "%n day(s)" msgstr[0] "%n hari" +msgstr[1] "%n hari" #. @item:intext %n is a whole number #: lib/util/kformatprivate.cpp:451 @@ -647,6 +649,7 @@ msgid "%n hour(s)" msgid_plural "%n hour(s)" msgstr[0] "%n jam" +msgstr[1] "%n jam" #. @item:intext %n is a whole number #: lib/util/kformatprivate.cpp:456 @@ -655,6 +658,7 @@ msgid "%n minute(s)" msgid_plural "%n minute(s)" msgstr[0] "%n menit" +msgstr[1] "%n menit" #. @item:intext %n is a whole number #: lib/util/kformatprivate.cpp:461 @@ -663,6 +667,7 @@ msgid "%n second(s)" msgid_plural "%n second(s)" msgstr[0] "%n detik" +msgstr[1] "%n detik" #. @item:intext days and hours. This uses the previous item:intext messages. If this does not fit the grammar of your language please contact the i18n team to solve the problem #. ---------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.55.0/po/zh_CN/kcoreaddons5_qt.po new/kcoreaddons-5.56.0/po/zh_CN/kcoreaddons5_qt.po --- old/kcoreaddons-5.55.0/po/zh_CN/kcoreaddons5_qt.po 2019-02-03 00:54:52.000000000 +0100 +++ new/kcoreaddons-5.56.0/po/zh_CN/kcoreaddons5_qt.po 2019-03-02 14:36:22.000000000 +0100 @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: kdeorg\n" -"PO-Revision-Date: 2019-01-27 22:57\n" +"PO-Revision-Date: 2019-02-20 23:15\n" "Last-Translator: guoyunhe <i...@guoyunhe.me>\n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.55.0/src/lib/io/kprocess.h new/kcoreaddons-5.56.0/src/lib/io/kprocess.h --- old/kcoreaddons-5.55.0/src/lib/io/kprocess.h 2019-02-03 00:54:52.000000000 +0100 +++ new/kcoreaddons-5.56.0/src/lib/io/kprocess.h 2019-03-02 14:36:22.000000000 +0100 @@ -329,8 +329,10 @@ private: // hide those +#if QT_DEPRECATED_SINCE(5, 13) using QProcess::setReadChannelMode; using QProcess::readChannelMode; +#endif using QProcess::setProcessChannelMode; using QProcess::processChannelMode; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.55.0/src/lib/text/ktexttohtml.cpp new/kcoreaddons-5.56.0/src/lib/text/ktexttohtml.cpp --- old/kcoreaddons-5.55.0/src/lib/text/ktexttohtml.cpp 2019-02-03 00:54:52.000000000 +0100 +++ new/kcoreaddons-5.56.0/src/lib/text/ktexttohtml.cpp 2019-03-02 14:36:22.000000000 +0100 @@ -26,6 +26,7 @@ #include <QStringList> #include <QFile> #include <QRegExp> +#include <QRegularExpression> #include <QPluginLoader> #include <QVariant> #include <QCoreApplication> @@ -143,6 +144,72 @@ return address; } +QString KTextToHTMLHelper::getPhoneNumber() +{ + if (!mText[mPos].isDigit() && mText[mPos] != QLatin1Char('+')) { + return {}; + } + + static const QString allowedBeginSeparators = QStringLiteral(" \r\t\n:"); + if (mPos > 0 && !allowedBeginSeparators.contains(mText[mPos - 1])) { + return {}; + } + + // this isn't 100% accurate, we filter stuff below that is too hard to capture with a regexp + static const QRegularExpression telPattern(QStringLiteral(R"([+0](( |( ?[/-] ?)?)\(?\d+\)?+){6,30})")); + const auto match = telPattern.match(mText, mPos, QRegularExpression::NormalMatch, QRegularExpression::AnchoredMatchOption); + if (match.hasMatch()) { + auto m = match.captured(); + // check for maximum number of digits (15), see https://en.wikipedia.org/wiki/Telephone_numbering_plan + if (std::count_if(m.begin(), m.end(), [](const QChar &c) { return c.isDigit(); }) > 15) { + return {}; + } + // only one / is allowed, otherwise we trigger on dates + if (std::count(m.begin(), m.end(), QLatin1Char('/')) > 1) { + return {}; + } + + // parenthesis need to be balanced, and must not be nested + int openIdx = -1; + for (int i = 0; i < m.size(); ++i) { + if ((m[i] == QLatin1Char('(') && openIdx >= 0) || (m[i] == QLatin1Char(')') && openIdx < 0)) { + return {}; + } + if (m[i] == QLatin1Char('(')) { + openIdx = i; + } else if (m[i] == QLatin1Char(')')) { + openIdx = -1; + } + } + if (openIdx > 0) { + m = m.left(openIdx - 1).trimmed(); + } + + // check if there's a plausible separator at the end + static const QString allowedEndSeparators = QStringLiteral(" \r\t\n,."); + const auto l = m.size(); + if (mText.size() > mPos + l && !allowedEndSeparators.contains(mText[mPos + l])) { + return {}; + } + + mPos += l - 1; + return m; + } + return {}; +} + +static QString normalizePhoneNumber(const QString &str) +{ + QString res; + res.reserve(str.size()); + for (const auto c : str) { + if (c.isDigit() || c == QLatin1Char('+')) { + res.push_back(c); + } + } + return res; +} + bool KTextToHTMLHelper::atUrl() const { // the following characters are allowed in a dot-atom (RFC 2822): @@ -170,7 +237,9 @@ (ch == QLatin1Char('w') && mText.midRef(mPos, 4) == QLatin1String("www.")) || (ch == QLatin1Char('f') && (mText.midRef(mPos, 4) == QLatin1String("ftp.") || mText.midRef(mPos, 7) == QLatin1String("file://"))) || - (ch == QLatin1Char('n') && mText.midRef(mPos, 5) == QLatin1String("news:")); + (ch == QLatin1Char('n') && mText.midRef(mPos, 5) == QLatin1String("news:")) || + (ch == QLatin1Char('t') && mText.midRef(mPos, 4) == QLatin1String("tel:")); + } bool KTextToHTMLHelper::isEmptyUrl(const QString &url) const @@ -188,7 +257,9 @@ url == QLatin1String("www") || url == QLatin1String("ftp") || url == QLatin1String("news") || - url == QLatin1String("news://"); + url == QLatin1String("news://") || + url == QLatin1String("tel") || + url == QLatin1String("tel:"); } QString KTextToHTMLHelper::getUrl(bool *badurl) @@ -499,6 +570,14 @@ x += str.length() - 1; continue; } + if (flags & ConvertPhoneNumbers) { + str = helper.getPhoneNumber(); + if (!str.isEmpty()) { + result += QLatin1String("<a href=\"tel:") + normalizePhoneNumber(str) + QLatin1String("\">") + str + QLatin1String("</a>"); + x += str.length() - 1; + continue; + } + } } if (flags & HighlightText) { str = helper.highlightedText(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.55.0/src/lib/text/ktexttohtml.h new/kcoreaddons-5.56.0/src/lib/text/ktexttohtml.h --- old/kcoreaddons-5.55.0/src/lib/text/ktexttohtml.h 2019-02-03 00:54:52.000000000 +0100 +++ new/kcoreaddons-5.56.0/src/lib/text/ktexttohtml.h 2019-03-02 14:36:22.000000000 +0100 @@ -60,7 +60,13 @@ * Interpret text highlighting markup, like *bold*, _underline_ and /italic/, * and wrap them in corresponding HTML entities. */ - HighlightText = 1 << 4 + HighlightText = 1 << 4, + + /** + * Replace phone numbers with tel: links. + * @since 5.56.0 + */ + ConvertPhoneNumbers = 1 << 5 }; Q_DECLARE_FLAGS(Options, Option) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.55.0/src/lib/text/ktexttohtml_p.h new/kcoreaddons-5.56.0/src/lib/text/ktexttohtml_p.h --- old/kcoreaddons-5.55.0/src/lib/text/ktexttohtml_p.h 2019-02-03 00:54:52.000000000 +0100 +++ new/kcoreaddons-5.56.0/src/lib/text/ktexttohtml_p.h 2019-03-02 14:36:22.000000000 +0100 @@ -47,6 +47,7 @@ KTextToHTMLEmoticonsInterface *emoticonsInterface() const; QString getEmailAddress(); + QString getPhoneNumber(); bool atUrl() const; bool isEmptyUrl(const QString &url) const; QString getUrl(bool *badurl = nullptr); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.55.0/src/mimetypes/kde5.xml new/kcoreaddons-5.56.0/src/mimetypes/kde5.xml --- old/kcoreaddons-5.55.0/src/mimetypes/kde5.xml 2019-02-03 00:54:52.000000000 +0100 +++ new/kcoreaddons-5.56.0/src/mimetypes/kde5.xml 2019-03-02 14:36:22.000000000 +0100 @@ -161,7 +161,7 @@ <comment xml:lang="fr">Police bitmap SNF</comment> <comment xml:lang="ga">Cló Giotánmhapach SNF</comment> <comment xml:lang="gd">cruth-clò bitmap SNF</comment> - <comment xml:lang="gl">Tipo de letra SNF bitmap</comment> + <comment xml:lang="gl">Tipo de letra SNF mapa de bits</comment> <comment xml:lang="hr">SNF bitmap pismo</comment> <comment xml:lang="hu">SNF-betűtípus</comment> <comment xml:lang="ia">font de bitmap SNF</comment> @@ -1730,7 +1730,7 @@ <comment xml:lang="fr">Moniteur système KDE</comment> <comment xml:lang="ga">Monatóir an chórais KDE</comment> <comment xml:lang="gd">monatair siostaim KDE</comment> - <comment xml:lang="gl">Vixiante do sistema de KDE</comment> + <comment xml:lang="gl">Monitor do sistema de KDE</comment> <comment xml:lang="hr">KDE-ov monitor sustava</comment> <comment xml:lang="hu">KDE rendszermonitor</comment> <comment xml:lang="ia">Monitor de Systema de KDE</comment> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.55.0/tests/kdirwatchtest_gui.cpp new/kcoreaddons-5.56.0/tests/kdirwatchtest_gui.cpp --- old/kcoreaddons-5.55.0/tests/kdirwatchtest_gui.cpp 2019-02-03 00:54:52.000000000 +0100 +++ new/kcoreaddons-5.56.0/tests/kdirwatchtest_gui.cpp 2019-03-02 14:36:22.000000000 +0100 @@ -42,7 +42,7 @@ QPushButton *e, *f; QVBoxLayout *lay = new QVBoxLayout(this); - lay->setMargin(0); + lay->setContentsMargins(0, 0, 0, 0); lay->addWidget(l1 = new QLineEdit(QLatin1String("Test 1"), this)); lay->addWidget(l2 = new QLineEdit(QLatin1String("Test 2"), this)); lay->addWidget(l3 = new QLineEdit(QLatin1String("Test 3"), this));