Hello community, here is the log from the commit of package kcoreaddons for openSUSE:Factory checked in at 2019-05-21 10:25:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kcoreaddons (Old) and /work/SRC/openSUSE:Factory/.kcoreaddons.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kcoreaddons" Tue May 21 10:25:54 2019 rev:69 rq:703337 version:5.58.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kcoreaddons/kcoreaddons.changes 2019-04-19 21:22:21.339719220 +0200 +++ /work/SRC/openSUSE:Factory/.kcoreaddons.new.5148/kcoreaddons.changes 2019-05-21 10:26:10.215534199 +0200 @@ -1,0 +2,14 @@ +Wed May 15 18:16:15 UTC 2019 - [email protected] + +- Update to 5.58.0 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/kde-frameworks-5.58.0.php +- Changes since 5.57.0: + * Fix wrong "Unable to find service type" warnings + * New class KOSRelease - a parser for os-release files + * Fix bug about "** foo **" + * Not necessary to have %2 here as we use %1 + * Skip running benchmarks when in debug mode. + +------------------------------------------------------------------- Old: ---- kcoreaddons-5.57.0.tar.xz New: ---- kcoreaddons-5.58.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kcoreaddons.spec ++++++ --- /var/tmp/diff_new_pack.S2pB9n/_old 2019-05-21 10:26:12.027533503 +0200 +++ /var/tmp/diff_new_pack.S2pB9n/_new 2019-05-21 10:26:12.031533501 +0200 @@ -17,14 +17,14 @@ %define lname libKF5CoreAddons5 -%define _tar_path 5.57 +%define _tar_path 5.58 # 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.57.0 +Version: 5.58.0 Release: 0 Summary: Utilities for core application functionality and accessing the OS License: LGPL-2.1-or-later ++++++ kcoreaddons-5.57.0.tar.xz -> kcoreaddons-5.58.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/CMakeLists.txt new/kcoreaddons-5.58.0/CMakeLists.txt --- old/kcoreaddons-5.57.0/CMakeLists.txt 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/CMakeLists.txt 2019-05-08 10:27:20.000000000 +0200 @@ -1,10 +1,10 @@ cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.57.0") # handled by release scripts +set(KF5_VERSION "5.58.0") # handled by release scripts project(KCoreAddons VERSION ${KF5_VERSION}) include(FeatureSummary) -find_package(ECM 5.57.0 NO_MODULE) +find_package(ECM 5.58.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.57.0/autotests/CMakeLists.txt new/kcoreaddons-5.58.0/autotests/CMakeLists.txt --- old/kcoreaddons-5.57.0/autotests/CMakeLists.txt 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/autotests/CMakeLists.txt 2019-05-08 10:27:20.000000000 +0200 @@ -8,6 +8,11 @@ return() endif() +if(NOT CMAKE_BUILD_TYPE MATCHES "[Dd]ebug$") + set(ENABLE_BENCHMARKS 1) +endif() +configure_file(config-tests.h.in config-tests.h) + macro(build_plugin pname) add_library(${pname} MODULE ${ARGN}) ecm_mark_as_test(${pname}) @@ -31,6 +36,7 @@ kcompositejobtest.cpp kformattest.cpp kjobtest.cpp + kosreleasetest.cpp kpluginfactorytest.cpp kpluginloadertest.cpp kpluginmetadatatest.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/autotests/config-tests.h.in new/kcoreaddons-5.58.0/autotests/config-tests.h.in --- old/kcoreaddons-5.57.0/autotests/config-tests.h.in 1970-01-01 01:00:00.000000000 +0100 +++ new/kcoreaddons-5.58.0/autotests/config-tests.h.in 2019-05-08 10:27:20.000000000 +0200 @@ -0,0 +1 @@ +#cmakedefine01 ENABLE_BENCHMARKS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/autotests/data/os-release new/kcoreaddons-5.58.0/autotests/data/os-release --- old/kcoreaddons-5.57.0/autotests/data/os-release 1970-01-01 01:00:00.000000000 +0100 +++ new/kcoreaddons-5.58.0/autotests/data/os-release 2019-05-08 10:27:20.000000000 +0200 @@ -0,0 +1,22 @@ +NAME="Name" +VERSION="100.5" +ID=theid +ID_LIKE="otherid otherotherid" +VERSION_CODENAME=versioncodename +VERSION_ID="500.1" +PRETTY_NAME="Pretty Name #1" +ANSI_COLOR="1;34" +CPE_NAME="cpe:/o:foo:bar:100" +HOME_URL="https://url.home" +DOCUMENTATION_URL="https://url.docs" +SUPPORT_URL="https://url.support" +BUG_REPORT_URL="https://url.bugs" +PRIVACY_POLICY_URL="https://url.privacy" +BUILD_ID="105.5" +# comment +VARIANT="Test = Edition" +BROKENLINE_SHOULD_BE_IGNORED +VARIANT_ID=test + # indented comment +LOGO=start-here-test +DEBIAN_BTS="debbugs://bugs.debian.org/" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/autotests/data/servicetypes/example-input.desktop new/kcoreaddons-5.58.0/autotests/data/servicetypes/example-input.desktop --- old/kcoreaddons-5.57.0/autotests/data/servicetypes/example-input.desktop 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/autotests/data/servicetypes/example-input.desktop 2019-05-08 10:27:20.000000000 +0200 @@ -27,7 +27,7 @@ Name[x-test]=xxExamplexx Name[zh_CN]=例子 Type=Service -X-KDE-ServiceTypes=foo/bar,bar/foo +X-KDE-ServiceTypes=example/servicetype,bar/foo X-Test-Integer=42 X-Test-Double=42.42 X-Test-List=a,b,c,def diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/autotests/data/servicetypes/example-servicetype.desktop new/kcoreaddons-5.58.0/autotests/data/servicetypes/example-servicetype.desktop --- old/kcoreaddons-5.57.0/autotests/data/servicetypes/example-servicetype.desktop 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/autotests/data/servicetypes/example-servicetype.desktop 2019-05-08 10:27:20.000000000 +0200 @@ -1,6 +1,6 @@ [Desktop Entry] Type=ServiceType -#Name=Sample +X-KDE-ServiceType=example/servicetype [PropertyDef::X-Test-Integer] Type=int diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/autotests/kdirwatch_unittest.cpp new/kcoreaddons-5.58.0/autotests/kdirwatch_unittest.cpp --- old/kcoreaddons-5.57.0/autotests/kdirwatch_unittest.cpp 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/autotests/kdirwatch_unittest.cpp 2019-05-08 10:27:20.000000000 +0200 @@ -30,6 +30,8 @@ #include <unistd.h> // ::link() #endif +#include "config-tests.h" + // Debugging notes: to see which inotify signals are emitted, either set s_verboseDebug=true // at the top of kdirwatch.cpp, or use the command-line tool "inotifywait -m /path" @@ -808,6 +810,9 @@ void KDirWatch_UnitTest::benchCreateTree() { +#if !ENABLE_BENCHMARKS + QSKIP("Benchmarks are disabled in debug mode"); +#endif QTemporaryDir dir; QBENCHMARK { @@ -817,6 +822,9 @@ void KDirWatch_UnitTest::benchCreateWatcher() { +#if !ENABLE_BENCHMARKS + QSKIP("Benchmarks are disabled in debug mode"); +#endif QTemporaryDir dir; createDirectoryTree(dir.path()); @@ -828,6 +836,9 @@ void KDirWatch_UnitTest::benchNotifyWatcher() { +#if !ENABLE_BENCHMARKS + QSKIP("Benchmarks are disabled in debug mode"); +#endif QTemporaryDir dir; // create the dir once upfront auto numFiles = createDirectoryTree(dir.path()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/autotests/kosreleasetest.cpp new/kcoreaddons-5.58.0/autotests/kosreleasetest.cpp --- old/kcoreaddons-5.57.0/autotests/kosreleasetest.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/kcoreaddons-5.58.0/autotests/kosreleasetest.cpp 2019-05-08 10:27:20.000000000 +0200 @@ -0,0 +1,57 @@ +/* + Copyright (C) 2014-2019 Harald Sitter <[email protected]> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) version 3, or any + later version accepted by the membership of KDE e.V. (or its + successor approved by the membership of KDE e.V.), which shall + act as a proxy defined in Section 6 of version 3 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see <https://www.gnu.org/licenses/>. +*/ + +#include <QTest> + +#include "kosrelease.h" + +class KOSReleaseTest : public QObject +{ + Q_OBJECT +private Q_SLOTS: + void testParse() + { + KOSRelease r(QFINDTESTDATA("data/os-release")); + QCOMPARE(r.name(), QStringLiteral("Name")); + QCOMPARE(r.version(), QStringLiteral("100.5")); + QCOMPARE(r.id(), QStringLiteral("theid")); + QCOMPARE(r.idLike(), QStringList({ QStringLiteral("otherid"), QStringLiteral("otherotherid") })); + QCOMPARE(r.versionCodename(), QStringLiteral("versioncodename")); + QCOMPARE(r.versionId(), QStringLiteral("500.1")); + QCOMPARE(r.prettyName(), QStringLiteral("Pretty Name #1")); + QCOMPARE(r.ansiColor(), QStringLiteral("1;34")); + QCOMPARE(r.cpeName(), QStringLiteral("cpe:/o:foo:bar:100")); + QCOMPARE(r.homeUrl(), QStringLiteral("https://url.home")); + QCOMPARE(r.documentationUrl(), QStringLiteral("https://url.docs")); + QCOMPARE(r.supportUrl(), QStringLiteral("https://url.support")); + QCOMPARE(r.bugReportUrl(), QStringLiteral("https://url.bugs")); + QCOMPARE(r.privacyPolicyUrl(), QStringLiteral("https://url.privacy")); + QCOMPARE(r.buildId(), QStringLiteral("105.5")); + QCOMPARE(r.variant(), QStringLiteral("Test = Edition")); + QCOMPARE(r.variantId(), QStringLiteral("test")); + QCOMPARE(r.logo(), QStringLiteral("start-here-test")); + QCOMPARE(r.extraKeys(), QStringList({ QStringLiteral("DEBIAN_BTS") })); + QCOMPARE(r.extraValue(QStringLiteral("DEBIAN_BTS")), QStringLiteral("debbugs://bugs.debian.org/")); + } +}; + +QTEST_MAIN(KOSReleaseTest) + +#include "kosreleasetest.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/autotests/kpluginmetadatatest.cpp new/kcoreaddons-5.58.0/autotests/kpluginmetadatatest.cpp --- old/kcoreaddons-5.57.0/autotests/kpluginmetadatatest.cpp 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/autotests/kpluginmetadatatest.cpp 2019-05-08 10:27:20.000000000 +0200 @@ -281,10 +281,11 @@ QVERIFY(!typesPath.isEmpty()); const QString inputPath = QFINDTESTDATA("data/servicetypes/example-input.desktop"); QVERIFY(!inputPath.isEmpty()); + QTest::ignoreMessage(QtWarningMsg, qPrintable(QStringLiteral("Unable to find service type for service \"bar/foo\" listed in \"") + inputPath + QLatin1Char('"'))); KPluginMetaData md = KPluginMetaData::fromDesktopFile(inputPath, QStringList() << typesPath); QVERIFY(md.isValid()); QCOMPARE(md.name(), QStringLiteral("Example")); - QCOMPARE(md.serviceTypes(), QStringList() << QStringLiteral("foo/bar") << QStringLiteral("bar/foo")); + QCOMPARE(md.serviceTypes(), QStringList() << QStringLiteral("example/servicetype") << QStringLiteral("bar/foo")); // qDebug().noquote() << QJsonDocument(md.rawData()).toJson(); QCOMPARE(md.rawData().size(), 8); QVERIFY(md.rawData().value(QStringLiteral("KPlugin")).isObject()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/autotests/ktexttohtmltest.cpp new/kcoreaddons-5.58.0/autotests/ktexttohtmltest.cpp --- old/kcoreaddons-5.57.0/autotests/ktexttohtmltest.cpp 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/autotests/ktexttohtmltest.cpp 2019-05-08 10:27:20.000000000 +0200 @@ -344,6 +344,14 @@ << KTextToHTML::Options(KTextToHTML::PreserveSpaces | KTextToHTML::HighlightText) << "<b>*Ouais: foo*</b>"; + QTest::newRow("multi-") << "** Ouais: foo **" + << KTextToHTML::Options(KTextToHTML::PreserveSpaces | KTextToHTML::HighlightText) + << "** Ouais: foo **"; + + QTest::newRow("multi-") << "*** Ouais: foo ***" + << KTextToHTML::Options(KTextToHTML::PreserveSpaces | KTextToHTML::HighlightText) + << "*** Ouais: foo ***"; + QTest::newRow("nohtmlversion") << "* Ouais: foo *" << KTextToHTML::Options(KTextToHTML::PreserveSpaces | KTextToHTML::HighlightText) << "* Ouais: foo *"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/po/ml/kcoreaddons5_qt.po new/kcoreaddons-5.58.0/po/ml/kcoreaddons5_qt.po --- old/kcoreaddons-5.57.0/po/ml/kcoreaddons5_qt.po 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/po/ml/kcoreaddons5_qt.po 2019-05-08 10:27:20.000000000 +0200 @@ -207,9 +207,9 @@ "org</a></p>" msgstr "" "<p>കെഡിഇ മലയാളം നിങ്ങള്ക്കായി അവതരിപ്പിക്കുന്നതു് സ്വതന്ത്ര മലയാളം കമ്പ്യൂട്ടിങ്ങ്പ്രവര്ത്തകരാണു്.</" -"p><p>സ്വതന്ത്ര മലയാളം കമ്പ്യൂട്ടിങ്ങ് കൂട്ടായ്മയെപ്പറ്റി കൂടുതലറിയാനും മലയാളം കമ്പ്യൂട്ടിങ്ങ് " -"പ്രവര്ത്തനങ്ങളില് പങ്കുചേരാനും <a href=\"http://smc.org.in\">http://smc.org.in </a> " -"എന്ന വെബ്സൈറ്റ് സന്ദര്ശിയ്ക്കുക</p>" +"p><p>സ്വതന്ത്ര മലയാളം കമ്പ്യൂട്ടിങ്ങ് കൂട്ടായ്മയെപ്പറ്റി കൂടുതലറിയാനും മലയാളം കമ്പ്യൂട്ടിങ്ങ് പ്രവര്" +"ത്തനങ്ങളില് പങ്കുചേരാനും <a href=\"http://smc.org.in\">http://smc.org.in </a> എന്ന " +"വെബ്സൈറ്റ് സന്ദര്ശിയ്ക്കുക</p>" #: lib/kaboutdata.cpp:1168 #, fuzzy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/po/sr/kcoreaddons5_qt.po new/kcoreaddons-5.58.0/po/sr/kcoreaddons5_qt.po --- old/kcoreaddons-5.57.0/po/sr/kcoreaddons5_qt.po 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/po/sr/kcoreaddons5_qt.po 2019-05-08 10:27:20.000000000 +0200 @@ -146,43 +146,43 @@ "затреба.</p><p>За детаљније информације о локализацији КДЕ‑а уопште, " "посетите <a href='https://l10n.kde.org'>https://l10n.kde.org</a>.</p></html>" -#: lib/kaboutdata.cpp:1165 +#: lib/kaboutdata.cpp:1168 msgctxt "KAboutData CLI|" msgid "Show author information." msgstr "Прикажи податке о ауторима." -#: lib/kaboutdata.cpp:1166 +#: lib/kaboutdata.cpp:1169 msgctxt "KAboutData CLI|" msgid "Show license information." msgstr "Прикажи податке о лиценци." -#: lib/kaboutdata.cpp:1168 +#: lib/kaboutdata.cpp:1171 msgctxt "KAboutData CLI|" msgid "The base file name of the desktop entry for this application." msgstr "Основно име фајла ставке површи за овај програм." -#: lib/kaboutdata.cpp:1169 +#: lib/kaboutdata.cpp:1172 msgctxt "KAboutData CLI|" msgid "file name" msgstr "Име фајла" -#: lib/kaboutdata.cpp:1178 +#: lib/kaboutdata.cpp:1181 msgctxt "KAboutData CLI|" msgid "This application was written by somebody who wants to remain anonymous." msgstr "Овај програм је написао неко ко жели да остане анониман." -#: lib/kaboutdata.cpp:1180 +#: lib/kaboutdata.cpp:1183 #, qt-format msgctxt "KAboutData CLI|" msgid "%1 was written by:" msgstr "%1 написали:" -#: lib/kaboutdata.cpp:1191 +#: lib/kaboutdata.cpp:1194 msgctxt "KAboutData CLI|" msgid "Please use https://bugs.kde.org to report bugs." msgstr "Користите https://bugs.kde.org за пријаву грешака." -#: lib/kaboutdata.cpp:1193 +#: lib/kaboutdata.cpp:1196 #, qt-format msgctxt "KAboutData CLI|" msgid "Please report bugs to %1." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/po/sr@ijekavian/kcoreaddons5_qt.po new/kcoreaddons-5.58.0/po/sr@ijekavian/kcoreaddons5_qt.po --- old/kcoreaddons-5.57.0/po/sr@ijekavian/kcoreaddons5_qt.po 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/po/sr@ijekavian/kcoreaddons5_qt.po 2019-05-08 10:27:20.000000000 +0200 @@ -145,43 +145,43 @@ "затреба.</p><p>За детаљније информације о локализацији КДЕ‑а уопште, " "посјетите <a href='https://l10n.kde.org'>https://l10n.kde.org</a>.</p></html>" -#: lib/kaboutdata.cpp:1165 +#: lib/kaboutdata.cpp:1168 msgctxt "KAboutData CLI|" msgid "Show author information." msgstr "Прикажи податке о ауторима." -#: lib/kaboutdata.cpp:1166 +#: lib/kaboutdata.cpp:1169 msgctxt "KAboutData CLI|" msgid "Show license information." msgstr "Прикажи податке о лиценци." -#: lib/kaboutdata.cpp:1168 +#: lib/kaboutdata.cpp:1171 msgctxt "KAboutData CLI|" msgid "The base file name of the desktop entry for this application." msgstr "Основно име фајла ставке површи за овај програм." -#: lib/kaboutdata.cpp:1169 +#: lib/kaboutdata.cpp:1172 msgctxt "KAboutData CLI|" msgid "file name" msgstr "Име фајла" -#: lib/kaboutdata.cpp:1178 +#: lib/kaboutdata.cpp:1181 msgctxt "KAboutData CLI|" msgid "This application was written by somebody who wants to remain anonymous." msgstr "Овај програм је написао неко ко жели да остане анониман." -#: lib/kaboutdata.cpp:1180 +#: lib/kaboutdata.cpp:1183 #, qt-format msgctxt "KAboutData CLI|" msgid "%1 was written by:" msgstr "%1 написали:" -#: lib/kaboutdata.cpp:1191 +#: lib/kaboutdata.cpp:1194 msgctxt "KAboutData CLI|" msgid "Please use https://bugs.kde.org to report bugs." msgstr "Користите https://bugs.kde.org за пријаву грешака." -#: lib/kaboutdata.cpp:1193 +#: lib/kaboutdata.cpp:1196 #, qt-format msgctxt "KAboutData CLI|" msgid "Please report bugs to %1." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/po/sr@ijekavianlatin/kcoreaddons5_qt.po new/kcoreaddons-5.58.0/po/sr@ijekavianlatin/kcoreaddons5_qt.po --- old/kcoreaddons-5.57.0/po/sr@ijekavianlatin/kcoreaddons5_qt.po 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/po/sr@ijekavianlatin/kcoreaddons5_qt.po 2019-05-08 10:27:20.000000000 +0200 @@ -145,43 +145,43 @@ "zatreba.</p><p>Za detaljnije informacije o lokalizaciji KDE‑a uopšte, " "posjetite <a href='https://l10n.kde.org'>https://l10n.kde.org</a>.</p></html>" -#: lib/kaboutdata.cpp:1165 +#: lib/kaboutdata.cpp:1168 msgctxt "KAboutData CLI|" msgid "Show author information." msgstr "Prikaži podatke o autorima." -#: lib/kaboutdata.cpp:1166 +#: lib/kaboutdata.cpp:1169 msgctxt "KAboutData CLI|" msgid "Show license information." msgstr "Prikaži podatke o licenci." -#: lib/kaboutdata.cpp:1168 +#: lib/kaboutdata.cpp:1171 msgctxt "KAboutData CLI|" msgid "The base file name of the desktop entry for this application." msgstr "Osnovno ime fajla stavke površi za ovaj program." -#: lib/kaboutdata.cpp:1169 +#: lib/kaboutdata.cpp:1172 msgctxt "KAboutData CLI|" msgid "file name" msgstr "Ime fajla" -#: lib/kaboutdata.cpp:1178 +#: lib/kaboutdata.cpp:1181 msgctxt "KAboutData CLI|" msgid "This application was written by somebody who wants to remain anonymous." msgstr "Ovaj program je napisao neko ko želi da ostane anoniman." -#: lib/kaboutdata.cpp:1180 +#: lib/kaboutdata.cpp:1183 #, qt-format msgctxt "KAboutData CLI|" msgid "%1 was written by:" msgstr "%1 napisali:" -#: lib/kaboutdata.cpp:1191 +#: lib/kaboutdata.cpp:1194 msgctxt "KAboutData CLI|" msgid "Please use https://bugs.kde.org to report bugs." msgstr "Koristite https://bugs.kde.org za prijavu grešaka." -#: lib/kaboutdata.cpp:1193 +#: lib/kaboutdata.cpp:1196 #, qt-format msgctxt "KAboutData CLI|" msgid "Please report bugs to %1." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/po/sr@latin/kcoreaddons5_qt.po new/kcoreaddons-5.58.0/po/sr@latin/kcoreaddons5_qt.po --- old/kcoreaddons-5.57.0/po/sr@latin/kcoreaddons5_qt.po 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/po/sr@latin/kcoreaddons5_qt.po 2019-05-08 10:27:20.000000000 +0200 @@ -145,43 +145,43 @@ "zatreba.</p><p>Za detaljnije informacije o lokalizaciji KDE‑a uopšte, " "posetite <a href='https://l10n.kde.org'>https://l10n.kde.org</a>.</p></html>" -#: lib/kaboutdata.cpp:1165 +#: lib/kaboutdata.cpp:1168 msgctxt "KAboutData CLI|" msgid "Show author information." msgstr "Prikaži podatke o autorima." -#: lib/kaboutdata.cpp:1166 +#: lib/kaboutdata.cpp:1169 msgctxt "KAboutData CLI|" msgid "Show license information." msgstr "Prikaži podatke o licenci." -#: lib/kaboutdata.cpp:1168 +#: lib/kaboutdata.cpp:1171 msgctxt "KAboutData CLI|" msgid "The base file name of the desktop entry for this application." msgstr "Osnovno ime fajla stavke površi za ovaj program." -#: lib/kaboutdata.cpp:1169 +#: lib/kaboutdata.cpp:1172 msgctxt "KAboutData CLI|" msgid "file name" msgstr "Ime fajla" -#: lib/kaboutdata.cpp:1178 +#: lib/kaboutdata.cpp:1181 msgctxt "KAboutData CLI|" msgid "This application was written by somebody who wants to remain anonymous." msgstr "Ovaj program je napisao neko ko želi da ostane anoniman." -#: lib/kaboutdata.cpp:1180 +#: lib/kaboutdata.cpp:1183 #, qt-format msgctxt "KAboutData CLI|" msgid "%1 was written by:" msgstr "%1 napisali:" -#: lib/kaboutdata.cpp:1191 +#: lib/kaboutdata.cpp:1194 msgctxt "KAboutData CLI|" msgid "Please use https://bugs.kde.org to report bugs." msgstr "Koristite https://bugs.kde.org za prijavu grešaka." -#: lib/kaboutdata.cpp:1193 +#: lib/kaboutdata.cpp:1196 #, qt-format msgctxt "KAboutData CLI|" msgid "Please report bugs to %1." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/po/zh_CN/kcoreaddons5_qt.po new/kcoreaddons-5.58.0/po/zh_CN/kcoreaddons5_qt.po --- old/kcoreaddons-5.57.0/po/zh_CN/kcoreaddons5_qt.po 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/po/zh_CN/kcoreaddons5_qt.po 2019-05-08 10:27:20.000000000 +0200 @@ -13,8 +13,8 @@ msgid "" msgstr "" "Project-Id-Version: kdeorg\n" -"PO-Revision-Date: 2019-03-07 09:22\n" -"Last-Translator: guoyunhe <[email protected]>\n" +"PO-Revision-Date: 2019-05-05 22:21\n" +"Last-Translator: Guo Yunhe (guoyunhe)\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/kcoreaddons-5.57.0/src/lib/CMakeLists.txt new/kcoreaddons-5.58.0/src/lib/CMakeLists.txt --- old/kcoreaddons-5.57.0/src/lib/CMakeLists.txt 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/src/lib/CMakeLists.txt 2019-05-08 10:27:20.000000000 +0200 @@ -86,6 +86,7 @@ util/kdelibs4configmigrator.cpp util/kformat.cpp util/kformatprivate.cpp + util/kosrelease.cpp util/kshell.cpp ${kcoreaddons_OPTIONAL_SRCS} ${kcoreaddons_QM_LOADER} @@ -197,6 +198,7 @@ ecm_generate_headers(KCoreAddons_HEADERS HEADER_NAMES KFormat + KOSRelease KUser KShell Kdelibs4Migration @@ -241,6 +243,7 @@ text/ktexttohtml.h text/ktexttohtmlemoticonsinterface.h util/kformat.h + util/kosrelease.h util/kuser.h util/kshell.h util/kdelibs4migration.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/src/lib/plugin/desktopfileparser.cpp new/kcoreaddons-5.58.0/src/lib/plugin/desktopfileparser.cpp --- old/kcoreaddons-5.57.0/src/lib/plugin/desktopfileparser.cpp 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/src/lib/plugin/desktopfileparser.cpp 2019-05-08 10:27:20.000000000 +0200 @@ -206,7 +206,7 @@ } -QByteArray readTypeEntryForCurrentGroup(QFile &df, QByteArray *nextGroup) +QByteArray readTypeEntryForCurrentGroup(QFile &df, QByteArray *nextGroup, QByteArray *pName) { QByteArray group = *nextGroup; QByteArray type; @@ -234,6 +234,13 @@ const auto match = typeEntryRegex.match(QString::fromUtf8(line)); if (match.hasMatch()) { type = match.captured(1).toUtf8(); + } else if (pName) { + const static QRegularExpression nameEntryRegex( + QStringLiteral("^X-KDE-ServiceType\\s*=\\s*(.*)$")); + const auto nameMatch = nameEntryRegex.match(QString::fromUtf8(line)); + if (nameMatch.hasMatch()) { + *pName = nameMatch.captured(1).toUtf8(); + } } } return type; @@ -290,7 +297,7 @@ QStringLiteral("kservicetypes5/") + relPath); } -static QVector<CustomPropertyDefinition>* parseServiceTypesFile(const QString &inputPath) +static ServiceTypeDefinition* parseServiceTypesFile(const QString &inputPath) { int lineNr = 0; QString path = inputPath; @@ -316,12 +323,12 @@ if (!readUntilDesktopEntryGroup(df, path, lineNr)) { return nullptr; } - QVector<CustomPropertyDefinition> result; + ServiceTypeDefinition result; // TODO: passing nextGroup by pointer is inefficient as it will make deep copies every time // Not exactly performance critical code though so low priority QByteArray nextGroup = "Desktop Entry"; // Type must be ServiceType now - QByteArray typeStr = readTypeEntryForCurrentGroup(df, &nextGroup); + QByteArray typeStr = readTypeEntryForCurrentGroup(df, &nextGroup, &result.m_serviceTypeName); if (typeStr != QByteArrayLiteral("ServiceType")) { qCWarning(DESKTOPPARSER) << path << "is not a valid service type: Type entry should be 'ServiceType', got" << typeStr << "instead."; @@ -329,7 +336,7 @@ } while (!df.atEnd()) { QByteArray currentGroup = nextGroup; - typeStr = readTypeEntryForCurrentGroup(df, &nextGroup); + typeStr = readTypeEntryForCurrentGroup(df, &nextGroup, nullptr); if (!currentGroup.startsWith(QByteArrayLiteral("PropertyDef::"))) { qCWarning(DESKTOPPARSER) << "Skipping invalid group" << currentGroup << "in service type" << path; continue; @@ -347,7 +354,7 @@ case QVariant::Double: case QVariant::Bool: qCDebug(DESKTOPPARSER) << "Found property definition" << propertyName << "with type" << typeStr; - result.push_back(CustomPropertyDefinition(propertyName, type)); + result.m_propertyDefs.push_back(CustomPropertyDefinition(propertyName, type)); break; case QVariant::Invalid: qCWarning(DESKTOPPARSER) << "Property type" << typeStr << "is not a known QVariant type." @@ -358,24 +365,20 @@ << "found in" << path << "\nOnly QString, QStringList, int, double and bool are supported."; } } - return new QVector<CustomPropertyDefinition>(result); + return new ServiceTypeDefinition(result); } // a lazy map of service type definitions -typedef QCache<QString, QVector<CustomPropertyDefinition>> ServiceTypesHash; +typedef QCache<QString /*path*/, ServiceTypeDefinition> ServiceTypesHash; Q_GLOBAL_STATIC(ServiceTypesHash, s_serviceTypes) // access must be guarded by serviceTypesMutex as this code could be executed by multiple threads QBasicMutex s_serviceTypesMutex; } // end of anonymous namespace -ServiceTypeDefinition::ServiceTypeDefinition() -{ -} - -ServiceTypeDefinition ServiceTypeDefinition::fromFiles(const QStringList &paths) +ServiceTypeDefinitions ServiceTypeDefinitions::fromFiles(const QStringList &paths) { - ServiceTypeDefinition ret; + ServiceTypeDefinitions ret; ret.m_definitions.reserve(paths.size()); // as we might modify the cache we need to acquire a mutex here for (const QString &serviceTypePath : paths) { @@ -389,16 +392,15 @@ return ret; } -bool ServiceTypeDefinition::addFile(const QString& path) +bool ServiceTypeDefinitions::addFile(const QString& path) { QMutexLocker lock(&s_serviceTypesMutex); - QVector<CustomPropertyDefinition>* def = s_serviceTypes->object(path); + ServiceTypeDefinition* def = s_serviceTypes->object(path); if (def) { // in cache but we still must make our own copy m_definitions << *def; - } - else { + } else { // not found in cache -> we need to parse the file qCDebug(DESKTOPPARSER) << "About to parse service type file" << path; def = parseServiceTypesFile(path); @@ -412,19 +414,29 @@ return true; } -QJsonValue ServiceTypeDefinition::parseValue(const QByteArray &key, const QString &value) const +QJsonValue ServiceTypeDefinitions::parseValue(const QByteArray &key, const QString &value) const { // check whether the key has a special type associated with it - for (const CustomPropertyDefinition &propertyDef : qAsConst(m_definitions)) { - if (propertyDef.key == key) { - return propertyDef.fromString(value); + for (const auto &def : m_definitions) { + for (const CustomPropertyDefinition &propertyDef : def.m_propertyDefs) { + if (propertyDef.key == key) { + return propertyDef.fromString(value); + } } } qCDebug(DESKTOPPARSER) << "Unknown property type for key" << key << "-> falling back to string"; return QJsonValue(value); } -void DesktopFileParser::convertToJson(const QByteArray &key, ServiceTypeDefinition &serviceTypes, const QString &value, +bool ServiceTypeDefinitions::hasServiceType(const QByteArray &serviceTypeName) const +{ + const auto it = std::find_if(m_definitions.begin(), m_definitions.end(), [&serviceTypeName](const ServiceTypeDefinition &def) { + return def.m_serviceTypeName == serviceTypeName; + }); + return it != m_definitions.end(); +} + +void DesktopFileParser::convertToJson(const QByteArray &key, ServiceTypeDefinitions &serviceTypes, const QString &value, QJsonObject &json, QJsonObject &kplugin, int lineNr) { /* The following keys are recognized (and added to a "KPlugin" object): @@ -528,7 +540,7 @@ { QFile df(src); int lineNr = 0; - ServiceTypeDefinition serviceTypeDef = ServiceTypeDefinition::fromFiles(serviceTypes); + ServiceTypeDefinitions serviceTypeDef = ServiceTypeDefinitions::fromFiles(serviceTypes); readUntilDesktopEntryGroup(df, src, lineNr); DESKTOPTOJSON_VERBOSE_DEBUG << "Found [Desktop Entry] group in line" << lineNr; auto startPos = df.pos(); @@ -547,17 +559,19 @@ const auto serviceList = deserializeList(value); for (const auto &service : serviceList) { - // Make up the filename from the service type name. This assumes consistent naming... - QString absFileName = locateRelativeServiceType( - service.toLower().replace(slashChar, QLatin1Char('-')) + dotDesktop); - if (absFileName.isEmpty()) { - absFileName = locateRelativeServiceType( - service.toLower().remove(slashChar) + dotDesktop); - } - if (absFileName.isEmpty()) { - qCWarning(DESKTOPPARSER) << "Unable to find service type for service" << service << "listed in" << src; - } else { - serviceTypeDef.addFile(absFileName); + if (!serviceTypeDef.hasServiceType(service.toLatin1())) { + // Make up the filename from the service type name. This assumes consistent naming... + QString absFileName = locateRelativeServiceType( + service.toLower().replace(slashChar, QLatin1Char('-')) + dotDesktop); + if (absFileName.isEmpty()) { + absFileName = locateRelativeServiceType( + service.toLower().remove(slashChar) + dotDesktop); + } + if (absFileName.isEmpty()) { + qCWarning(DESKTOPPARSER) << "Unable to find service type for service" << service << "listed in" << src; + } else { + serviceTypeDef.addFile(absFileName); + } } } break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/src/lib/plugin/desktopfileparser_p.h new/kcoreaddons-5.58.0/src/lib/plugin/desktopfileparser_p.h --- old/kcoreaddons-5.57.0/src/lib/plugin/desktopfileparser_p.h 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/src/lib/plugin/desktopfileparser_p.h 2019-05-08 10:27:20.000000000 +0200 @@ -36,9 +36,13 @@ struct CustomPropertyDefinition; struct ServiceTypeDefinition { - ServiceTypeDefinition(); + QVector<CustomPropertyDefinition> m_propertyDefs; + QByteArray m_serviceTypeName; +}; - static ServiceTypeDefinition fromFiles(const QStringList &paths); +struct ServiceTypeDefinitions +{ + static ServiceTypeDefinitions fromFiles(const QStringList &paths); /** * @return @p value converted to the correct JSON type. * If there is no custom property definition for @p key this will simply return the string value @@ -52,8 +56,10 @@ */ bool addFile(const QString &path); + bool hasServiceType(const QByteArray &serviceTypeName) const; + private: - QVector<CustomPropertyDefinition> m_definitions; + QVector<ServiceTypeDefinition> m_definitions; }; namespace DesktopFileParser @@ -61,7 +67,7 @@ QByteArray escapeValue(const QByteArray &input); QStringList deserializeList(const QString &data, char separator = ','); bool convert(const QString &src, const QStringList &serviceTypes, QJsonObject &json, QString *libraryPath); - void convertToJson(const QByteArray &key, ServiceTypeDefinition &serviceTypes, const QString &value, + void convertToJson(const QByteArray &key, ServiceTypeDefinitions &serviceTypes, const QString &value, QJsonObject &json, QJsonObject &kplugin, int lineNr); #ifdef BUILDING_DESKTOPTOJSON_TOOL void convertToCompatibilityJson(const QString &key, const QString &value, QJsonObject &json, int lineNr); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/src/lib/text/ktexttohtml.cpp new/kcoreaddons-5.58.0/src/lib/text/ktexttohtml.cpp --- old/kcoreaddons-5.57.0/src/lib/text/ktexttohtml.cpp 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/src/lib/text/ktexttohtml.cpp 2019-05-08 10:27:20.000000000 +0200 @@ -401,7 +401,7 @@ return QString(); } - QRegularExpression re(QStringLiteral("\\%1([^\\s].*[^\\s])\\%2").arg(ch).arg(ch)); + QRegularExpression re(QStringLiteral("\\%1([^\\s|^\\%1].*[^\\s|^\\%1])\\%1").arg(ch)); re.setPatternOptions(QRegularExpression::InvertedGreedinessOption); const auto match = re.match(mText, mPos, QRegularExpression::NormalMatch, QRegularExpression::AnchoredMatchOption); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/src/lib/util/kosrelease.cpp new/kcoreaddons-5.58.0/src/lib/util/kosrelease.cpp --- old/kcoreaddons-5.57.0/src/lib/util/kosrelease.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/kcoreaddons-5.58.0/src/lib/util/kosrelease.cpp 2019-05-08 10:27:20.000000000 +0200 @@ -0,0 +1,306 @@ +/* + Copyright (C) 2014-2019 Harald Sitter <[email protected]> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) version 3, or any + later version accepted by the membership of KDE e.V. (or its + successor approved by the membership of KDE e.V.), which shall + act as a proxy defined in Section 6 of version 3 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see <https://www.gnu.org/licenses/>. +*/ + +#include "kosrelease.h" + +#include <QDebug> +#include <QFile> + +#include "kcoreaddons_debug.h" +#include "kshell.h" + +// Sets a QString var +static void setVar(QString *var, const QString &value) +{ + // Values may contain quotation marks, strip them as we have no use for them. + KShell::Errors error; + QStringList args = KShell::splitArgs(value, KShell::NoOptions, &error); + if (error != KShell::NoError) { // Failed to parse. + return; + } + *var = args.join(QLatin1Char(' ')); +} + +// Sets a QStringList var (i.e. splits a string value) +static void setVar(QStringList *var, const QString &value) +{ + // Instead of passing the verbatim value we manually strip any initial quotes + // and then run it through KShell. At this point KShell will actually split + // by spaces giving us the final QStringList. + // NOTE: Splitting like this does not actually allow escaped substrings to + // be handled correctly, so "kitteh \"french fries\"" would result in + // three list entries. I'd argue that if someone makes an id like that + // they are at fault for the bogus parsing here though as id explicitly + // is required to not contain spaces even if more advanced shell escaping + // is also allowed... + QString value_ = value; + if (value_.at(0) == QLatin1Char('"') && value_.at(value_.size()-1) == QLatin1Char('"')) { + value_.remove(0, 1); + value_.remove(-1, 1); + } + KShell::Errors error; + QStringList args = KShell::splitArgs(value_, KShell::NoOptions, &error); + if (error != KShell::NoError) { // Failed to parse. + return; + } + *var = args; +} + +static QStringList splitEntry(const QString &line) +{ + QStringList list; + const int separatorIndex = line.indexOf(QLatin1Char('=')); + list << line.mid(0, separatorIndex); + if (separatorIndex != -1) { + list << line.mid(separatorIndex + 1, -1); + } + return list; +} + +static QString defaultFilePath() +{ + if (QFile::exists(QStringLiteral("/etc/os-release"))) { + return QStringLiteral("/etc/os-release"); + } else if (QFile::exists(QStringLiteral("/usr/lib/os-release"))) { + return QStringLiteral("/usr/lib/os-release"); + } else { + return QString(); + } +} + +class Q_DECL_HIDDEN KOSRelease::Private +{ +public: + Private(QString filePath) + : name(QStringLiteral("Linux")) + , id(QStringLiteral("linux")) + , prettyName(QStringLiteral("Linux")) + { + // Default values for non-optional fields set above ^. + + QHash<QString, QString *> stringHash = { + { QStringLiteral("NAME"), &name }, + { QStringLiteral("VERSION"), &version }, + { QStringLiteral("ID"), &id }, + // idLike is not a QString, special handling below! + { QStringLiteral("VERSION_CODENAME"), &versionCodename }, + { QStringLiteral("VERSION_ID"), &versionId }, + { QStringLiteral("PRETTY_NAME"), &prettyName }, + { QStringLiteral("ANSI_COLOR"), &ansiColor }, + { QStringLiteral("CPE_NAME"), &cpeName }, + { QStringLiteral("HOME_URL"), &homeUrl }, + { QStringLiteral("DOCUMENTATION_URL"), &documentationUrl }, + { QStringLiteral("SUPPORT_URL"), &supportUrl }, + { QStringLiteral("BUG_REPORT_URL"), &bugReportUrl }, + { QStringLiteral("PRIVACY_POLICY_URL"), &privacyPolicyUrl }, + { QStringLiteral("BUILD_ID"), &buildId }, + { QStringLiteral("VARIANT"), &variant }, + { QStringLiteral("VARIANT_ID"), &variantId }, + { QStringLiteral("LOGO"), &logo } + }; + + if (filePath.isEmpty()) { + filePath = defaultFilePath(); + } + if (filePath.isEmpty()) { + qCWarning(KCOREADDONS_DEBUG) << "Failed to find os-release file!"; + return; + } + + QFile file(filePath); + // NOTE: The os-release specification defines default values for specific + // fields which means that even if we can not read the os-release file + // we have sort of expected default values to use. + // TODO: it might still be handy to indicate to the outside whether + // fallback values are being used or not. + file.open(QIODevice::ReadOnly | QIODevice::Text); + QString line; + QStringList parts; + while (!file.atEnd()) { + // Trimmed to handle indented comment lines properly + line = QString::fromLatin1(file.readLine()).trimmed(); + + if (line.startsWith(QLatin1Char('#'))) { + // Comment line + // Lines beginning with "#" shall be ignored as comments. + continue; + } + + parts = splitEntry(line); + + if (parts.size() != 2) { + // Line has no =, must be invalid. + qCDebug(KCOREADDONS_DEBUG) << "Unexpected/invalid os-release line:" << line; + continue; + } + + QString key = parts.at(0); + QString value = parts.at(1).trimmed(); + + if (QString *var = stringHash.value(key, nullptr)) { + setVar(var, value); + continue; + } + + // ID_LIKE is a list and parsed as such (rather than a QString). + if (key == QLatin1String("ID_LIKE")) { + setVar(&idLike, value); + continue; + } + + // os-release explicitly allows for vendor specific additions, we'll + // collect them as strings and exposes them as "extras". + QString parsedValue; + setVar(&parsedValue, value); + extras.insert(key, parsedValue); + } + } + + QString name; + QString version; + QString id; + QStringList idLike; + QString versionCodename; + QString versionId; + QString prettyName; + QString ansiColor; + QString cpeName; + QString homeUrl; + QString documentationUrl; + QString supportUrl; + QString bugReportUrl; + QString privacyPolicyUrl; + QString buildId; + QString variant; + QString variantId; + QString logo; + + QHash<QString, QString> extras; +}; + +KOSRelease::KOSRelease(const QString &filePath) + : d(new Private(filePath)) +{ +} + +KOSRelease::~KOSRelease() +{ + delete d; +} + +QString KOSRelease::name() const +{ + return d->name; +} + +QString KOSRelease::version() const +{ + return d->version; +} + +QString KOSRelease::id() const +{ + return d->id; +} + +QStringList KOSRelease::idLike() const +{ + return d->idLike; +} + +QString KOSRelease::versionCodename() const +{ + return d->versionCodename; +} + +QString KOSRelease::versionId() const +{ + return d->versionId; +} + +QString KOSRelease::prettyName() const +{ + return d->prettyName; +} + +QString KOSRelease::ansiColor() const +{ + return d->ansiColor; +} + +QString KOSRelease::cpeName() const +{ + return d->cpeName; +} + +QString KOSRelease::homeUrl() const +{ + return d->homeUrl; +} + +QString KOSRelease::documentationUrl() const +{ + return d->documentationUrl; +} + +QString KOSRelease::supportUrl() const +{ + return d->supportUrl; +} + +QString KOSRelease::bugReportUrl() const +{ + return d->bugReportUrl; +} + +QString KOSRelease::privacyPolicyUrl() const +{ + return d->privacyPolicyUrl; +} + +QString KOSRelease::buildId() const +{ + return d->buildId; +} + +QString KOSRelease::variant() const +{ + return d->variant; +} + +QString KOSRelease::variantId() const +{ + return d->variantId; +} + +QString KOSRelease::logo() const +{ + return d->logo; +} + +QStringList KOSRelease::extraKeys() const +{ + return d->extras.keys(); +} + +QString KOSRelease::extraValue(const QString &key) const +{ + return d->extras.value(key); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/src/lib/util/kosrelease.h new/kcoreaddons-5.58.0/src/lib/util/kosrelease.h --- old/kcoreaddons-5.57.0/src/lib/util/kosrelease.h 1970-01-01 01:00:00.000000000 +0100 +++ new/kcoreaddons-5.58.0/src/lib/util/kosrelease.h 2019-05-08 10:27:20.000000000 +0200 @@ -0,0 +1,108 @@ +/* + Copyright (C) 2014-2019 Harald Sitter <[email protected]> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) version 3, or any + later version accepted by the membership of KDE e.V. (or its + successor approved by the membership of KDE e.V.), which shall + act as a proxy defined in Section 6 of version 3 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see <https://www.gnu.org/licenses/>. +*/ + +#ifndef KOSRELEASE_H +#define KOSRELEASE_H + +#include <kcoreaddons_export.h> + +#include <QString> +#include <QStringList> + +/** + * @brief The OSRelease class parses /etc/os-release files + * + * https://www.freedesktop.org/software/systemd/man/os-release.html + * + * os-release is a free desktop standard for describing an operating system. + * This class parses and models os-release files. + * + * @since 5.58.0 + */ +class KCOREADDONS_EXPORT KOSRelease Q_DECL_FINAL +{ +public: + /** + * Constructs a new OSRelease instance. Parsing happens in the constructor + * and the data is not cached across instances. + * + * @note The format specification makes no assertions about trailing # + * comments being supported. They result in undefined behavior. + * + * @param filePath The path to the os-release file. By default the first + * available file of the paths specified in the os-release manpage is + * parsed. + */ + explicit KOSRelease(const QString &filePath = QString()); + ~KOSRelease(); + + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#NAME= */ + QString name() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#VERSION= */ + QString version() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#ID= */ + QString id() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#ID_LIKE= */ + QStringList idLike() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#VERSION_CODENAME= */ + QString versionCodename() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#VERSION_ID= */ + QString versionId() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#PRETTY_NAME= */ + QString prettyName() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#ANSI_COLOR= */ + QString ansiColor() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#CPE_NAME= */ + QString cpeName() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#HOME_URL= */ + QString homeUrl() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#HOME_URL= */ + QString documentationUrl() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#HOME_URL= */ + QString supportUrl() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#HOME_URL= */ + QString bugReportUrl() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#HOME_URL= */ + QString privacyPolicyUrl() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#BUILD_ID= */ + QString buildId() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#VARIANT= */ + QString variant() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#VARIANT_ID= */ + QString variantId() const; + /** @see https://www.freedesktop.org/software/systemd/man/os-release.html#LOGO= */ + QString logo() const; + + /** + * Extra keys are keys that are unknown or specified by a vendor. + */ + QStringList extraKeys() const; + + /** Extra values are values assoicated with keys that are unknown. */ + QString extraValue(const QString &key) const; + +private: + Q_DISABLE_COPY(KOSRelease) + + class Private; + Private *const d = nullptr; +}; + +#endif // KOSRELEASE_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcoreaddons-5.57.0/src/mimetypes/kde5.xml new/kcoreaddons-5.58.0/src/mimetypes/kde5.xml --- old/kcoreaddons-5.57.0/src/mimetypes/kde5.xml 2019-04-07 09:25:50.000000000 +0200 +++ new/kcoreaddons-5.58.0/src/mimetypes/kde5.xml 2019-05-08 10:27:20.000000000 +0200 @@ -708,7 +708,7 @@ <comment xml:lang="hr">Calligra Plan, dokument za upravljanje projektom</comment> <comment xml:lang="hu">Calligra Plan projektkezelő dokumentum</comment> <comment xml:lang="ia">Calligra Plan: Documento de gestion de projecto</comment> - <comment xml:lang="id">Dokumen pengelolaan proyek Calligra Plan</comment> + <comment xml:lang="id">Dokumen pengelolaan projek Calligra Plan</comment> <comment xml:lang="is">Calligra Plan verkstjórnunarskjal</comment> <comment xml:lang="it">documento di gestione dei progetti di Calligra Plan</comment> <comment xml:lang="ja">Calligra Plan プロジェクト管理文書</comment> @@ -821,7 +821,7 @@ <comment xml:lang="hr">KPlato dokument upravljanja projektom</comment> <comment xml:lang="hu">KPlato projektkezelő dokumentum</comment> <comment xml:lang="ia">KPlato: Documento de gestion de projecto</comment> - <comment xml:lang="id">Dokumen pengelolaan proyek KPlato</comment> + <comment xml:lang="id">Dokumen pengelolaan projek KPlato</comment> <comment xml:lang="is">KPlato verkstjórnunarskjal</comment> <comment xml:lang="it">documento di gestione dei progetti di KPlato</comment> <comment xml:lang="ja">KPlato プロジェクト管理文書</comment> @@ -879,7 +879,7 @@ <comment xml:lang="hr">KPlato radni paket upravljanja projektom</comment> <comment xml:lang="hu">KPlato projektkezelő munkacsomag</comment> <comment xml:lang="ia">KPlato: Pacchetto de travalio de gestion de projecto</comment> - <comment xml:lang="id">Paket kerja pengelolaan proyek KPlato</comment> + <comment xml:lang="id">Paket kerja pengelolaan projek KPlato</comment> <comment xml:lang="is">KPlato verkstjórnunar vinnupakki</comment> <comment xml:lang="it">pacchetto di lavoro di gestione dei progetti di KPlato</comment> <comment xml:lang="ja">KPlato プロジェクト管理作業パッケージ</comment>
