Hello community, here is the log from the commit of package kfilemetadata5 for openSUSE:Factory checked in at 2020-12-15 12:28:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kfilemetadata5 (Old) and /work/SRC/openSUSE:Factory/.kfilemetadata5.new.2328 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kfilemetadata5" Tue Dec 15 12:28:38 2020 rev:91 rq:855431 version:5.77.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kfilemetadata5/kfilemetadata5.changes 2020-11-23 10:32:15.297477336 +0100 +++ /work/SRC/openSUSE:Factory/.kfilemetadata5.new.2328/kfilemetadata5.changes 2020-12-15 12:30:46.136018895 +0100 @@ -1,0 +2,12 @@ +Sat Dec 5 18:56:32 UTC 2020 - Christophe Giboudeaux <[email protected]> + +- Update to 5.77.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/kde-frameworks-5.77.0 +- Changes since 5.76.0: + * Port some deprecated method + * Fix some leaks in OpenDocument and Office OpenXML extractors + * Add several subtypes for OpenDocument and OpenXML document + +------------------------------------------------------------------- Old: ---- kfilemetadata-5.76.0.tar.xz kfilemetadata-5.76.0.tar.xz.sig New: ---- kfilemetadata-5.77.0.tar.xz kfilemetadata-5.77.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kfilemetadata5.spec ++++++ --- /var/tmp/diff_new_pack.0uKvJQ/_old 2020-12-15 12:30:46.940019544 +0100 +++ /var/tmp/diff_new_pack.0uKvJQ/_new 2020-12-15 12:30:46.944019546 +0100 @@ -16,7 +16,7 @@ # -%define _tar_path 5.76 +%define _tar_path 5.77 # Full KF5 version (e.g. 5.33.0) %{!?_kf5_version: %global _kf5_version %{version}} # Last major and minor KF5 version (e.g. 5.33) @@ -24,7 +24,7 @@ %bcond_without ffmpeg %bcond_without lang Name: kfilemetadata5 -Version: 5.76.0 +Version: 5.77.0 Release: 0 Summary: Library for extracting Metadata License: GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-3.0-only @@ -46,8 +46,8 @@ BuildRequires: cmake(KF5Archive) >= %{_kf5_bugfix_version} BuildRequires: cmake(KF5CoreAddons) >= %{_kf5_bugfix_version} BuildRequires: cmake(KF5I18n) >= %{_kf5_bugfix_version} -BuildRequires: cmake(Qt5Test) >= 5.12.0 -BuildRequires: cmake(Qt5Xml) >= 5.12.0 +BuildRequires: cmake(Qt5Test) >= 5.13.0 +BuildRequires: cmake(Qt5Xml) >= 5.13.0 BuildRequires: pkgconfig(poppler-qt5) Recommends: %{name}-lang %if %{with ffmpeg} @@ -64,7 +64,7 @@ Group: Development/Libraries/KDE Requires: %{name} = %{version} Requires: extra-cmake-modules >= %{_kf5_bugfix_version} -Requires: cmake(Qt5Core) >= 5.12.0 +Requires: cmake(Qt5Core) >= 5.13.0 %description devel A library for extracting file metadata. Development files ++++++ kfilemetadata-5.76.0.tar.xz -> kfilemetadata-5.77.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.76.0/CMakeLists.txt new/kfilemetadata-5.77.0/CMakeLists.txt --- old/kfilemetadata-5.76.0/CMakeLists.txt 2020-11-07 13:06:18.000000000 +0100 +++ new/kfilemetadata-5.77.0/CMakeLists.txt 2020-12-05 13:44:39.000000000 +0100 @@ -1,11 +1,11 @@ cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.76.0") # handled by release scripts -set(KF5_DEP_VERSION "5.76.0") # handled by release scripts +set(KF5_VERSION "5.77.0") # handled by release scripts +set(KF5_DEP_VERSION "5.77.0") # handled by release scripts project(KFileMetaData VERSION ${KF5_VERSION}) include(FeatureSummary) -find_package(ECM 5.76.0 NO_MODULE) +find_package(ECM 5.77.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) @@ -33,7 +33,7 @@ SOVERSION 3) # Dependencies -set(REQUIRED_QT_VERSION 5.12.0) +set(REQUIRED_QT_VERSION 5.13.0) find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG COMPONENTS Gui) set_package_properties(Qt5Gui PROPERTIES DESCRIPTION "Qt 5: Gui component" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.76.0/autotests/xmlextractortest.cpp new/kfilemetadata-5.77.0/autotests/xmlextractortest.cpp --- old/kfilemetadata-5.76.0/autotests/xmlextractortest.cpp 2020-11-07 13:06:18.000000000 +0100 +++ new/kfilemetadata-5.77.0/autotests/xmlextractortest.cpp 2020-12-05 13:44:39.000000000 +0100 @@ -91,7 +91,7 @@ QVERIFY(plugin.mimetypes().contains(mimeType)); SimpleExtractionResult result(fileName, mimeType, - ExtractionResult::ExtractEverything); + ExtractionResult::ExtractMetaData | ExtractionResult::ExtractPlainText); plugin.extract(&result); QString content = QStringLiteral("Some text\n"); @@ -130,7 +130,7 @@ SimpleExtractionResult result(testFilePath(QStringLiteral("test_with_container.svg")), QStringLiteral("image/svg"), - ExtractionResult::ExtractEverything); + ExtractionResult::ExtractMetaData | ExtractionResult::ExtractPlainText); plugin.extract(&result); QString content = QStringLiteral("Some text below <a>\n"); @@ -150,7 +150,7 @@ SimpleExtractionResult result(testFilePath(QStringLiteral("test.mml")), QStringLiteral("application/mathml+xml"), - ExtractionResult::ExtractEverything); + ExtractionResult::ExtractMetaData | ExtractionResult::ExtractPlainText); plugin.extract(&result); QString content = QStringLiteral("1 + 1 = 2\n"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.76.0/po/zh_CN/kfilemetadata5.po new/kfilemetadata-5.77.0/po/zh_CN/kfilemetadata5.po --- old/kfilemetadata-5.76.0/po/zh_CN/kfilemetadata5.po 2020-11-07 13:06:18.000000000 +0100 +++ new/kfilemetadata-5.77.0/po/zh_CN/kfilemetadata5.po 2020-12-05 13:44:39.000000000 +0100 @@ -10,7 +10,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2020-06-09 02:02+0200\n" -"PO-Revision-Date: 2020-10-08 19:21\n" +"PO-Revision-Date: 2020-11-10 15:00\n" "Last-Translator: \n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.76.0/src/extractorplugin.cpp new/kfilemetadata-5.77.0/src/extractorplugin.cpp --- old/kfilemetadata-5.76.0/src/extractorplugin.cpp 2020-11-07 13:06:18.000000000 +0100 +++ new/kfilemetadata-5.77.0/src/extractorplugin.cpp 2020-12-05 13:44:39.000000000 +0100 @@ -110,18 +110,38 @@ cleanedString = cleanedString.remove(QLatin1Char('{')); cleanedString = cleanedString.remove(QLatin1Char('}')); +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) QStringList contactStrings = string.split(QLatin1Char(','), QString::SkipEmptyParts); +#else + QStringList contactStrings = string.split(QLatin1Char(','), Qt::SkipEmptyParts); +#endif if (contactStrings.size() == 1) +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) contactStrings = string.split(QLatin1Char(';'), QString::SkipEmptyParts); +#else + contactStrings = string.split(QLatin1Char(';'), Qt::SkipEmptyParts); +#endif if (contactStrings.size() == 1) +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) contactStrings = string.split(QStringLiteral(" ft "), QString::SkipEmptyParts); +#else + contactStrings = string.split(QStringLiteral(" ft "), Qt::SkipEmptyParts); +#endif if (contactStrings.size() == 1) +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) contactStrings = string.split(QStringLiteral(" feat. "), QString::SkipEmptyParts); +#else + contactStrings = string.split(QStringLiteral(" feat. "), Qt::SkipEmptyParts); +#endif if (contactStrings.size() == 1) +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) contactStrings = string.split(QStringLiteral(" feat "), QString::SkipEmptyParts); +#else + contactStrings = string.split(QStringLiteral(" feat "), Qt::SkipEmptyParts); +#endif QStringList list; list.reserve(contactStrings.count()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.76.0/src/extractors/odfextractor.cpp new/kfilemetadata-5.77.0/src/extractors/odfextractor.cpp --- old/kfilemetadata-5.76.0/src/extractors/odfextractor.cpp 2020-11-07 13:06:18.000000000 +0100 +++ new/kfilemetadata-5.77.0/src/extractors/odfextractor.cpp 2020-12-05 13:44:39.000000000 +0100 @@ -8,6 +8,7 @@ #include "odfextractor.h" +#include <memory> #include <KZip> @@ -34,8 +35,13 @@ const QStringList supportedMimeTypes = { QStringLiteral("application/vnd.oasis.opendocument.text"), + QStringLiteral("application/vnd.oasis.opendocument.text-template"), + QStringLiteral("application/vnd.oasis.opendocument.text-master"), + QStringLiteral("application/vnd.oasis.opendocument.text-master-template"), QStringLiteral("application/vnd.oasis.opendocument.presentation"), + QStringLiteral("application/vnd.oasis.opendocument.presentation-template"), QStringLiteral("application/vnd.oasis.opendocument.spreadsheet"), + QStringLiteral("application/vnd.oasis.opendocument.spreadsheet-template"), }; } @@ -68,15 +74,15 @@ } // we need a meta xml file in the archive! - const auto metaXml = directory->entry(QStringLiteral("meta.xml")); - if (!metaXml || !metaXml->isFile()) { + const auto metaXml = directory->file(QStringLiteral("meta.xml")); + if (!metaXml) { qWarning() << "Invalid document structure (meta.xml is missing)"; return; } if (result->inputFlags() & ExtractionResult::ExtractMetaData) { QDomDocument metaData(QStringLiteral("metaData")); - metaData.setContent(static_cast<const KArchiveFile*>(metaXml)->data(), true); + metaData.setContent(metaXml->data(), true); // parse metadata ... QDomElement meta = firstChildElementNS(firstChildElementNS(metaData, @@ -134,10 +140,12 @@ } result->addType(Type::Document); - if (result->inputMimetype() == QLatin1String("application/vnd.oasis.opendocument.presentation")) { + if ((result->inputMimetype() == QLatin1String("application/vnd.oasis.opendocument.presentation")) || + (result->inputMimetype() == QLatin1String("application/vnd.oasis.opendocument.presentation-template"))) { result->addType(Type::Presentation); } - else if (result->inputMimetype() == QLatin1String("application/vnd.oasis.opendocument.spreadsheet")) { + else if ((result->inputMimetype() == QLatin1String("application/vnd.oasis.opendocument.spreadsheet")) || + (result->inputMimetype() == QLatin1String("application/vnd.oasis.opendocument.spreadsheet-template"))) { result->addType(Type::Spreadsheet); } @@ -146,13 +154,14 @@ } // for content indexing, we need content xml file - const auto contentXml = directory->entry(QStringLiteral("content.xml")); - if (!contentXml || !contentXml->isFile()) { + const auto contentXml = directory->file(QStringLiteral("content.xml")); + if (!contentXml) { qWarning() << "Invalid document structure (content.xml is missing)"; return; } - QXmlStreamReader xml(static_cast<const KArchiveFile*>(contentXml)->createDevice()); + std::unique_ptr<QIODevice> contentIODevice{contentXml->createDevice()}; + QXmlStreamReader xml(contentIODevice.get()); while (!xml.atEnd()) { xml.readNext(); if (xml.isCharacters()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.76.0/src/extractors/odfextractor.json new/kfilemetadata-5.77.0/src/extractors/odfextractor.json --- old/kfilemetadata-5.76.0/src/extractors/odfextractor.json 2020-11-07 13:06:18.000000000 +0100 +++ new/kfilemetadata-5.77.0/src/extractors/odfextractor.json 2020-12-05 13:44:39.000000000 +0100 @@ -2,9 +2,14 @@ "Name" : "OdfExtractor", "Id" : "org.kde.odfextractor", "MimeTypes" : { - "application/vnd.oasis.opendocument.text" : { "Version" : "0.0" }, - "application/vnd.oasis.opendocument.presentation" : { "Version" : "0.0" }, - "application/vnd.oasis.opendocument.spreadsheet" : { "Version" : "0.0" } + "application/vnd.oasis.opendocument.text" : { "Version" : "0.0" }, + "application/vnd.oasis.opendocument.text-template" : { "Version" : "0.0" }, + "application/vnd.oasis.opendocument.text-master" : { "Version" : "0.0" }, + "application/vnd.oasis.opendocument.text-master-template" : { "Version" : "0.0" }, + "application/vnd.oasis.opendocument.presentation" : { "Version" : "0.0" }, + "application/vnd.oasis.opendocument.presentation-template" : { "Version" : "0.0" }, + "application/vnd.oasis.opendocument.spreadsheet" : { "Version" : "0.0" }, + "application/vnd.oasis.opendocument.spreadsheet-template" : { "Version" : "0.0" } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.76.0/src/extractors/office2007extractor.cpp new/kfilemetadata-5.77.0/src/extractors/office2007extractor.cpp --- old/kfilemetadata-5.76.0/src/extractors/office2007extractor.cpp 2020-11-07 13:06:18.000000000 +0100 +++ new/kfilemetadata-5.77.0/src/extractors/office2007extractor.cpp 2020-12-05 13:44:39.000000000 +0100 @@ -6,6 +6,7 @@ #include "office2007extractor.h" +#include <memory> #include <KZip> @@ -23,8 +24,13 @@ const QStringList supportedMimeTypes = { QStringLiteral("application/vnd.openxmlformats-officedocument.wordprocessingml.document"), + QStringLiteral("application/vnd.openxmlformats-officedocument.wordprocessingml.template"), QStringLiteral("application/vnd.openxmlformats-officedocument.presentationml.presentation"), + QStringLiteral("application/vnd.openxmlformats-officedocument.presentationml.slide"), + QStringLiteral("application/vnd.openxmlformats-officedocument.presentationml.slideshow"), + QStringLiteral("application/vnd.openxmlformats-officedocument.presentationml.template"), QStringLiteral("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"), + QStringLiteral("application/vnd.openxmlformats-officedocument.spreadsheetml.template"), }; QStringList Office2007Extractor::mimetypes() const @@ -59,13 +65,12 @@ } const KArchiveDirectory* docPropDirectory = dynamic_cast<const KArchiveDirectory*>(docPropEntry); - const QStringList docPropsEntries = docPropDirectory->entries(); const bool extractMetaData = result->inputFlags() & ExtractionResult::ExtractMetaData; - if (extractMetaData && docPropsEntries.contains(QStringLiteral("core.xml"))) { + const KArchiveFile* file = docPropDirectory->file(QStringLiteral("core.xml")); + if (extractMetaData && file) { QDomDocument coreDoc(QStringLiteral("core")); - const KArchiveFile* file = static_cast<const KArchiveFile*>(docPropDirectory->entry(QStringLiteral("core.xml"))); coreDoc.setContent(file->data()); QDomElement docElem = coreDoc.documentElement(); @@ -128,9 +133,9 @@ } } - if (extractMetaData && docPropsEntries.contains(QStringLiteral("app.xml"))) { + file = docPropDirectory->file(QStringLiteral("app.xml")); + if (extractMetaData && file) { QDomDocument appDoc(QStringLiteral("app")); - const KArchiveFile* file = static_cast<const KArchiveFile*>(docPropDirectory->entry(QStringLiteral("app.xml"))); appDoc.setContent(file->data()); QDomElement docElem = appDoc.documentElement(); @@ -187,9 +192,12 @@ const QStringList wordEntries = wordDirectory->entries(); if (wordEntries.contains(QStringLiteral("document.xml"))) { - const KArchiveFile* file = static_cast<const KArchiveFile*>(wordDirectory->entry(QStringLiteral("document.xml"))); + const KArchiveFile* file = wordDirectory->file(QStringLiteral("document.xml")); - extractTextWithTag(file->createDevice(), QStringLiteral("w:t"), result); + if (file) { + std::unique_ptr<QIODevice> contentIODevice{file->createDevice()}; + extractTextWithTag(contentIODevice.get(), QStringLiteral("w:t"), result); + } } } @@ -249,17 +257,20 @@ const QStringList entries = archiveDir->entries(); for (const QString & entryName : entries) { const KArchiveEntry* entry = archiveDir->entry(entryName); + if (!entry) { + continue; + } if (entry->isDirectory()) { const KArchiveDirectory* subDir = dynamic_cast<const KArchiveDirectory*>(entry); extractTextFromFiles(subDir, result); continue; } - if (!entryName.endsWith(QLatin1String(".xml"))) - continue; - - const KArchiveFile* file = static_cast<const KArchiveFile*>(entry); - extractAllText(file->createDevice(), result); + if (entry->isFile() && entryName.endsWith(QLatin1String(".xml"))) { + const KArchiveFile* file = static_cast<const KArchiveFile*>(entry); + std::unique_ptr<QIODevice> contentIODevice{file->createDevice()}; + extractAllText(contentIODevice.get() , result); + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.76.0/src/extractors/office2007extractor.json new/kfilemetadata-5.77.0/src/extractors/office2007extractor.json --- old/kfilemetadata-5.76.0/src/extractors/office2007extractor.json 2020-11-07 13:06:18.000000000 +0100 +++ new/kfilemetadata-5.77.0/src/extractors/office2007extractor.json 2020-12-05 13:44:39.000000000 +0100 @@ -3,8 +3,13 @@ "Id" : "org.kde.office2007extractor", "MimeTypes" : { "application/vnd.openxmlformats-officedocument.wordprocessingml.document" : { "Version" : "0.0" }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template" : { "Version" : "0.0" }, "application/vnd.openxmlformats-officedocument.presentationml.presentation" : { "Version" : "0.0" }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" : { "Version" : "0.0" } + "application/vnd.openxmlformats-officedocument.presentationml.slide" : { "Version" : "0.0" }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow" : { "Version" : "0.0" }, + "application/vnd.openxmlformats-officedocument.presentationml.template" : { "Version" : "0.0" }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" : { "Version" : "0.0" }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template" : { "Version" : "0.0" } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.76.0/src/usermetadata.cpp new/kfilemetadata-5.77.0/src/usermetadata.cpp --- old/kfilemetadata-5.76.0/src/usermetadata.cpp 2020-11-07 13:06:18.000000000 +0100 +++ new/kfilemetadata-5.77.0/src/usermetadata.cpp 2020-12-05 13:44:39.000000000 +0100 @@ -59,7 +59,11 @@ QString value; k_getxattr(d->filePath, QStringLiteral("user.xdg.tags"), &value); +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) return value.split(QLatin1Char(','), QString::SkipEmptyParts); +#else + return value.split(QLatin1Char(','), Qt::SkipEmptyParts); +#endif } int UserMetaData::rating() const _______________________________________________ openSUSE Commits mailing list -- [email protected] To unsubscribe, email [email protected] List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/[email protected]
