Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kfilemetadata5 for openSUSE:Factory checked in at 2021-11-15 15:25:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kfilemetadata5 (Old) and /work/SRC/openSUSE:Factory/.kfilemetadata5.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kfilemetadata5" Mon Nov 15 15:25:13 2021 rev:102 rq:931083 version:5.88.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kfilemetadata5/kfilemetadata5.changes 2021-10-18 22:00:21.442013933 +0200 +++ /work/SRC/openSUSE:Factory/.kfilemetadata5.new.1890/kfilemetadata5.changes 2021-11-15 15:26:26.421824170 +0100 @@ -1,0 +2,21 @@ +Sun Nov 7 09:13:20 UTC 2021 - Christophe Giboudeaux <christo...@krop.fr> + +- Strip 'Source' URL for faster submissions + +------------------------------------------------------------------- +Sun Nov 7 09:08:03 UTC 2021 - Christophe Giboudeaux <christo...@krop.fr> + +- Update to 5.88.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/frameworks/5/5.88.0 +- Changes since 5.87.0: + * Fix wrong testcase. + * Port QStringRef (deprecated) to QStringView + * [FFmpegExtractor] Remove FFmpeg 2.x/3.0 support, handle deprecations + * Fix version checks in FindFFmpeg.cmake + * [DublinCore] Also test terms namespace + * [PopplerExtractor] directly use getters provided by poppler + * Add FreeBSD CI + +------------------------------------------------------------------- Old: ---- kfilemetadata-5.87.0.tar.xz kfilemetadata-5.87.0.tar.xz.sig New: ---- kfilemetadata-5.88.0.tar.xz kfilemetadata-5.88.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kfilemetadata5.spec ++++++ --- /var/tmp/diff_new_pack.U3y7WB/_old 2021-11-15 15:26:27.221824394 +0100 +++ /var/tmp/diff_new_pack.U3y7WB/_new 2021-11-15 15:26:27.221824394 +0100 @@ -16,7 +16,7 @@ # -%define _tar_path 5.87 +%define _tar_path 5.88 # 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,15 +24,15 @@ %bcond_without ffmpeg %bcond_without lang Name: kfilemetadata5 -Version: 5.87.0 +Version: 5.88.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 Group: Development/Libraries/KDE URL: https://www.kde.org -Source: https://download.kde.org/stable/frameworks/%{_tar_path}/kfilemetadata-%{version}.tar.xz +Source: kfilemetadata-%{version}.tar.xz %if %{with lang} -Source1: https://download.kde.org/stable/frameworks/%{_tar_path}/kfilemetadata-%{version}.tar.xz.sig +Source1: kfilemetadata-%{version}.tar.xz.sig Source2: frameworks.keyring %endif BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version} ++++++ kfilemetadata-5.87.0.tar.xz -> kfilemetadata-5.88.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.87.0/.gitlab-ci.yml new/kfilemetadata-5.88.0/.gitlab-ci.yml --- old/kfilemetadata-5.87.0/.gitlab-ci.yml 2021-10-02 16:26:55.000000000 +0200 +++ new/kfilemetadata-5.88.0/.gitlab-ci.yml 2021-11-06 14:18:54.000000000 +0100 @@ -3,3 +3,4 @@ include: - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml + - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.87.0/CMakeLists.txt new/kfilemetadata-5.88.0/CMakeLists.txt --- old/kfilemetadata-5.87.0/CMakeLists.txt 2021-10-02 16:26:55.000000000 +0200 +++ new/kfilemetadata-5.88.0/CMakeLists.txt 2021-11-06 14:18:54.000000000 +0100 @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.16) -set(KF_VERSION "5.87.0") # handled by release scripts +set(KF_VERSION "5.88.0") # handled by release scripts set(KF_DEP_VERSION "5.87.0") # handled by release scripts project(KFileMetaData VERSION ${KF_VERSION}) @@ -81,11 +81,6 @@ URL "https://ffmpeg.org/" TYPE OPTIONAL PURPOSE "Support for video metadata") -if (FFmpeg_AVFORMAT_FOUND) - set(CMAKE_REQUIRED_INCLUDES ${AVCODEC_INCLUDE_DIRS}) - CHECK_STRUCT_HAS_MEMBER(AVStream codecpar "stdint.h;libavformat/avformat.h" HAVE_AVSTREAM_CODECPAR LANGUAGE CXX) -endif() - find_package(EPub) set_package_properties(EPub PROPERTIES DESCRIPTION "Ebook epub reader" URL "https://sourceforge.net/projects/ebook-tools/" TYPE OPTIONAL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.87.0/autotests/extractorcoveragetest.cpp new/kfilemetadata-5.88.0/autotests/extractorcoveragetest.cpp --- old/kfilemetadata-5.87.0/autotests/extractorcoveragetest.cpp 2021-10-02 16:26:55.000000000 +0200 +++ new/kfilemetadata-5.88.0/autotests/extractorcoveragetest.cpp 2021-11-06 14:18:54.000000000 +0100 @@ -67,6 +67,7 @@ { "test.ts", "video/mp2t"}, { "test.wav", "audio/x-wav"}, { "test.webm", "video/webm"}, + { "test_dcterms.svg", "image/svg+xml"}, { "test_with_container.svg", "image/svg+xml"}, { "test_with_metadata.svg", "image/svg+xml"}, { "test.wma", "audio/x-ms-wma"}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.87.0/autotests/propertyinfotest.cpp new/kfilemetadata-5.88.0/autotests/propertyinfotest.cpp --- old/kfilemetadata-5.87.0/autotests/propertyinfotest.cpp 2021-10-02 16:26:55.000000000 +0200 +++ new/kfilemetadata-5.88.0/autotests/propertyinfotest.cpp 2021-11-06 14:18:54.000000000 +0100 @@ -100,7 +100,7 @@ } rows[] = { { Property::DiscNumber, true, 2018, QStringLiteral("2018")}, { Property::Title, false, QStringLiteral("Title"), QStringLiteral("Title")}, - { Property::Title, false, titleList, QStringLiteral("Title1 and Title2")}, + { Property::Title, true, titleList, QStringLiteral("Title1 and Title2")}, { Property::Artist, true, artistList, QStringLiteral("Artist1, Artist2, and Artist3")}, { Property::Author, true, authorList, QStringLiteral("Author1")}, { Property::Arranger, true, arrangerList, QStringLiteral("Arranger1 and Arranger2")}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.87.0/autotests/samplefiles/test_dcterms.svg new/kfilemetadata-5.88.0/autotests/samplefiles/test_dcterms.svg --- old/kfilemetadata-5.87.0/autotests/samplefiles/test_dcterms.svg 1970-01-01 01:00:00.000000000 +0100 +++ new/kfilemetadata-5.88.0/autotests/samplefiles/test_dcterms.svg 2021-11-06 14:18:54.000000000 +0100 @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dcterms="http://purl.org/dc/terms/" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns="http://www.w3.org/2000/svg" + version="1.0"> + <metadata> + <rdf:RDF> + <cc:Work rdf:about=""> + <dcterms:description>A test document for Dublin Core Terms namespace</dcterms:description> + <dcterms:subject>Dublin Core</dcterms:subject> + <dcterms:subject>Testing</dcterms:subject> + <dcterms:title>Document Title</dcterms:title> + <dcterms:creator>Stefan Br??ns</dcterms:creator> + <dcterms:language>en</dcterms:language> + </cc:Work> + </rdf:RDF> + </metadata> + <g> + <text>Some text</text> + </g> +</svg> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.87.0/autotests/xmlextractortest.cpp new/kfilemetadata-5.88.0/autotests/xmlextractortest.cpp --- old/kfilemetadata-5.87.0/autotests/xmlextractortest.cpp 2021-10-02 16:26:55.000000000 +0200 +++ new/kfilemetadata-5.88.0/autotests/xmlextractortest.cpp 2021-11-06 14:18:54.000000000 +0100 @@ -73,7 +73,7 @@ QString content = QStringLiteral("foo bar\n"); content.replace(QLatin1Char('\n'), QLatin1Char(' ')); - QCOMPARE(result.text().leftRef(8), content.leftRef(8)); + QCOMPARE(result.text().left(8), content.left(8)); QCOMPARE(result.text().size(), 8 * count); QBENCHMARK { @@ -123,6 +123,34 @@ QVERIFY(result.text().isEmpty()); } + +void XmlExtractorTests::testXmlExtractorNoContentDcterms() +{ + XmlExtractor plugin{this}; + + SimpleExtractionResult result(testFilePath(QStringLiteral("test_dcterms.svg")), + QStringLiteral("image/svg"), + ExtractionResult::ExtractMetaData); + plugin.extract(&result); + + QCOMPARE(result.types().size(), 1); + QCOMPARE(result.types().at(0), Type::Image); + + const auto properties = result.properties(); + QCOMPARE(properties.size(), 6); + QCOMPARE(properties.value(Property::Description).toString(), + QStringLiteral("A test document for Dublin Core Terms namespace")); + QCOMPARE(properties.value(Property::Title).toString(), QStringLiteral("Document Title")); + QCOMPARE(properties.value(Property::Author).toString(), QStringLiteral("Stefan Br??ns")); + QCOMPARE(properties.value(Property::Language).toString(), QStringLiteral("en")); + + const auto subjects = QVariantList(properties.lowerBound(Property::Subject), + properties.upperBound(Property::Subject)); + QCOMPARE(subjects.size(), 2); + QCOMPARE(subjects, QVariantList({QStringLiteral("Testing"), QStringLiteral("Dublin Core")})); + + QVERIFY(result.text().isEmpty()); +} void XmlExtractorTests::testXmlExtractorContainer() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.87.0/autotests/xmlextractortest.h new/kfilemetadata-5.88.0/autotests/xmlextractortest.h --- old/kfilemetadata-5.87.0/autotests/xmlextractortest.h 2021-10-02 16:26:55.000000000 +0200 +++ new/kfilemetadata-5.88.0/autotests/xmlextractortest.h 2021-11-06 14:18:54.000000000 +0100 @@ -24,6 +24,7 @@ void benchMarkXmlExtractor(); void testXmlExtractor(); void testXmlExtractorNoContent(); + void testXmlExtractorNoContentDcterms(); void testXmlExtractorContainer(); void testXmlExtractorMathML(); }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.87.0/cmake/FindFFmpeg.cmake new/kfilemetadata-5.88.0/cmake/FindFFmpeg.cmake --- old/kfilemetadata-5.87.0/cmake/FindFFmpeg.cmake 2021-10-02 16:26:55.000000000 +0200 +++ new/kfilemetadata-5.88.0/cmake/FindFFmpeg.cmake 2021-11-06 14:18:54.000000000 +0100 @@ -7,32 +7,52 @@ # FFMPEG_LIBRARIES - Link these to use the required ffmpeg components. # FFMPEG_DEFINITIONS - Compiler switches required for using the required ffmpeg components. # -# For each of the components it will additionally set. +# For each of the components # - AVCODEC # - AVDEVICE # - AVFORMAT # - AVUTIL # - POSTPROCESS # - SWSCALE -# the following variables will be defined +# the following variables will be defined: # <component>_FOUND - System has <component> # <component>_INCLUDE_DIRS - Include directory necessary for using the <component> headers # <component>_LIBRARIES - Link these to use <component> # <component>_DEFINITIONS - Compiler switches required for using <component> # <component>_VERSION - The components version # +# As the versions of the various FFmpeg components differ for a given release, +# and CMake supports only one common version for all components, use the +# following to specify required versions for multiple components: +# +# find_package(FFmpeg 57.48 COMPONENTS AVCODEC) +# find_package(FFmpeg 57.40 COMPONENTS AVFORMAT) +# find_package(FFmpeg 55.27 COMPONENTS AVUTIL) +# # SPDX-FileCopyrightText: 2006 Matthias Kretz <kr...@kde.org> # SPDX-FileCopyrightText: 2008 Alexander Neundorf <neund...@kde.org> # SPDX-FileCopyrightText: 2011 Michael Jansen <k...@michael-jansen.biz> +# SPDX-FileCopyrightText: 2021 Stefan Br??ns <stefan.bru...@rwth-aachen.de> # SPDX-License-Identifier: BSD-3-Clause include(FindPackageHandleStandardArgs) -# The default components were taken from a survey over other FindFFMPEG.cmake files if (NOT FFmpeg_FIND_COMPONENTS) + # The default components were taken from a survey over other FindFFMPEG.cmake files set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL) endif () +list(LENGTH FFmpeg_FIND_COMPONENTS _numComponents) +if ((${_numComponents} GREATER 1) AND DEFINED ${FFmpeg_FIND_VERSION}) + message(WARNING "Using a required version in combination with multiple COMPONENTS is not supported") + set(_FFmpeg_REQUIRED_VERSION 0) +elseif (DEFINED FFmpeg_FIND_VERSION) + set(_FFmpeg_REQUIRED_VERSION ${FFmpeg_FIND_VERSION}) +else () + set(_FFmpeg_REQUIRED_VERSION 0) +endif () +set(_FFmpeg_ALL_COMPONENTS AVCODEC AVDEVICE AVFORMAT AVUTIL POSTPROCESS SWSCALE) + # ### Macro: set_component_found # @@ -40,11 +60,8 @@ # macro(set_component_found _component ) if (${_component}_LIBRARIES AND ${_component}_INCLUDE_DIRS) - # message(STATUS " - ${_component} found.") set(${_component}_FOUND TRUE) set(FFmpeg_${_component}_FOUND TRUE) - else () - # message(STATUS " - ${_component} not found.") endif () endmacro() @@ -54,14 +71,14 @@ # Checks for the given component by invoking pkgconfig and then looking up the libraries and # include directories. # -macro(find_component _component _pkgconfig _library _header _version) +macro(find_component _component _pkgconfig _library _header) if (NOT WIN32) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls find_package(PkgConfig) if (PKG_CONFIG_FOUND) - pkg_check_modules(PC_${_component} ${_pkgconfig}>=${_version}) + pkg_check_modules(PC_${_component} QUIET ${_pkgconfig}) endif () endif (NOT WIN32) @@ -96,22 +113,19 @@ if (NOT FFMPEG_LIBRARIES) # Check for all possible component. - find_component(AVCODEC libavcodec avcodec libavcodec/avcodec.h ${FFmpeg_FIND_VERSION}) - find_component(AVFORMAT libavformat avformat libavformat/avformat.h ${FFmpeg_FIND_VERSION}) - find_component(AVDEVICE libavdevice avdevice libavdevice/avdevice.h ${FFmpeg_FIND_VERSION}) - find_component(AVUTIL libavutil avutil libavutil/avutil.h ${FFmpeg_FIND_VERSION}) - find_component(SWSCALE libswscale swscale libswscale/swscale.h ${FFmpeg_FIND_VERSION}) - find_component(POSTPROCESS libpostproc postproc libpostproc/postprocess.h ${FFmpeg_FIND_VERSION}) + find_component(AVCODEC libavcodec avcodec libavcodec/avcodec.h) + find_component(AVFORMAT libavformat avformat libavformat/avformat.h) + find_component(AVDEVICE libavdevice avdevice libavdevice/avdevice.h) + find_component(AVUTIL libavutil avutil libavutil/avutil.h) + find_component(SWSCALE libswscale swscale libswscale/swscale.h) + find_component(POSTPROCESS libpostproc postproc libpostproc/postprocess.h) # Check if the required components were found and add their stuff to the FFMPEG_* vars. - foreach (_component ${FFmpeg_FIND_COMPONENTS}) + foreach (_component ${_FFmpeg_ALL_COMPONENTS}) if (${_component}_FOUND) - # message(STATUS "Required component ${_component} present.") set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${${_component}_LIBRARIES}) set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} ${${_component}_DEFINITIONS}) list(APPEND FFMPEG_INCLUDE_DIRS ${${_component}_INCLUDE_DIRS}) - else () - # message(STATUS "Required component ${_component} missing.") endif () endforeach () @@ -129,23 +143,29 @@ FFMPEG_LIBRARIES FFMPEG_DEFINITIONS) +else () + # Set the noncached _FOUND vars for the components. + foreach (_component ${_FFmpeg_ALL_COMPONENTS}) + set_component_found(${_component}) + endforeach () endif () -# Now set the noncached _FOUND vars for the components. -foreach (_component AVCODEC AVDEVICE AVFORMAT AVUTIL POSTPROCESS SWSCALE) - set_component_found(${_component}) -endforeach () - # Compile the list of required vars -set(_FFmpeg_REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS) +unset(_FFmpeg_REQUIRED_VARS) +set(_FFmpeg_FOUND_LIBRARIES "") foreach (_component ${FFmpeg_FIND_COMPONENTS}) - list(APPEND _FFmpeg_REQUIRED_VARS ${_component}_LIBRARIES ${_component}_INCLUDE_DIRS) + if (${_component}_FOUND) + if (${_component}_VERSION VERSION_LESS _FFmpeg_REQUIRED_VERSION) + message(STATUS "${_component}: ${${_component}_VERSION} < ${_FFmpeg_REQUIRED_VERSION}") + unset(${_component}_FOUND) + endif () + list(APPEND _FFmpeg_FOUND_LIBRARIES ${${_component}_LIBRARIES}) + endif () + list(APPEND _FFmpeg_REQUIRED_VARS ${_component}_LIBRARIES ${_component}_INCLUDE_DIRS ${_component}_FOUND) endforeach () - - +list(INSERT _FFmpeg_REQUIRED_VARS 0 _FFmpeg_FOUND_LIBRARIES) # Give a nice error message if some of the required vars are missing. find_package_handle_standard_args(FFmpeg REQUIRED_VARS ${_FFmpeg_REQUIRED_VARS} HANDLE_COMPONENTS) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.87.0/po/ca/kfilemetadata5.po new/kfilemetadata-5.88.0/po/ca/kfilemetadata5.po --- old/kfilemetadata-5.87.0/po/ca/kfilemetadata5.po 2021-10-02 16:26:55.000000000 +0200 +++ new/kfilemetadata-5.88.0/po/ca/kfilemetadata5.po 2021-11-06 14:18:54.000000000 +0100 @@ -3,7 +3,7 @@ # This file is distributed under the license LGPL version 2.1 or # version 3 or later versions approved by the membership of KDE e.V. # -# Josep Ma. Ferrer <txe...@gmail.com>, 2014, 2015, 2016, 2017, 2018, 2019. +# Josep M. Ferrer <txe...@gmail.com>, 2014, 2015, 2016, 2017, 2018, 2019. # Antoni Bella P??rez <antonibel...@yahoo.com>, 2014, 2015. msgid "" msgstr "" @@ -11,7 +11,7 @@ "Report-Msgid-Bugs-To: https://bugs.kde.org\n" "POT-Creation-Date: 2020-06-09 02:02+0200\n" "PO-Revision-Date: 2019-06-22 10:34+0100\n" -"Last-Translator: Josep Ma. Ferrer <txe...@gmail.com>\n" +"Last-Translator: Josep M. Ferrer <txe...@gmail.com>\n" "Language-Team: Catalan <kde-i18n...@kde.org>\n" "Language: ca\n" "MIME-Version: 1.0\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.87.0/po/zh_CN/kfilemetadata5.po new/kfilemetadata-5.88.0/po/zh_CN/kfilemetadata5.po --- old/kfilemetadata-5.87.0/po/zh_CN/kfilemetadata5.po 2021-10-02 16:26:55.000000000 +0200 +++ new/kfilemetadata-5.88.0/po/zh_CN/kfilemetadata5.po 2021-11-06 14:18:54.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: 2021-09-27 13:08\n" +"PO-Revision-Date: 2021-10-29 13:24\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.87.0/src/extractorplugin.h new/kfilemetadata-5.88.0/src/extractorplugin.h --- old/kfilemetadata-5.87.0/src/extractorplugin.h 2021-10-02 16:26:55.000000000 +0200 +++ new/kfilemetadata-5.88.0/src/extractorplugin.h 2021-11-06 14:18:54.000000000 +0100 @@ -35,7 +35,7 @@ Q_OBJECT public: explicit ExtractorPlugin(QObject* parent); - virtual ~ExtractorPlugin(); + ~ExtractorPlugin() override; /** * Provide a list of mimetypes which are supported by this plugin. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.87.0/src/extractors/CMakeLists.txt new/kfilemetadata-5.88.0/src/extractors/CMakeLists.txt --- old/kfilemetadata-5.87.0/src/extractors/CMakeLists.txt 2021-10-02 16:26:55.000000000 +0200 +++ new/kfilemetadata-5.88.0/src/extractors/CMakeLists.txt 2021-11-06 14:18:54.000000000 +0100 @@ -53,7 +53,7 @@ endif() -if(FFMPEG_FOUND) +if(AVCODEC_FOUND AND AVFORMAT_FOUND AND AVUTIL_FOUND) add_library(kfilemetadata_ffmpegextractor MODULE ffmpegextractor.cpp ../kfilemetadata_debug.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.87.0/src/extractors/ffmpegextractor.cpp new/kfilemetadata-5.88.0/src/extractors/ffmpegextractor.cpp --- old/kfilemetadata-5.87.0/src/extractors/ffmpegextractor.cpp 2021-10-02 16:26:55.000000000 +0200 +++ new/kfilemetadata-5.88.0/src/extractors/ffmpegextractor.cpp 2021-11-06 14:18:54.000000000 +0100 @@ -58,7 +58,9 @@ { AVFormatContext* fmt_ctx = nullptr; +#if LIBAVFORMAT_VERSION_MAJOR < 58 av_register_all(); +#endif QByteArray arr = result->inputUrl().toUtf8(); @@ -87,11 +89,7 @@ if (index_stream >= 0) { AVStream* stream = fmt_ctx->streams[index_stream]; -#if defined HAVE_AVSTREAM_CODECPAR && HAVE_AVSTREAM_CODECPAR const AVCodecParameters* codec = stream->codecpar; -#else - const AVCodecContext* codec = stream->codec; -#endif if (codec->codec_type == AVMEDIA_TYPE_VIDEO) { result->add(Property::Width, codec->width); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.87.0/src/extractors/popplerextractor.cpp new/kfilemetadata-5.88.0/src/extractors/popplerextractor.cpp --- old/kfilemetadata-5.87.0/src/extractors/popplerextractor.cpp 2021-10-02 16:26:55.000000000 +0200 +++ new/kfilemetadata-5.88.0/src/extractors/popplerextractor.cpp 2021-11-06 14:18:54.000000000 +0100 @@ -10,6 +10,7 @@ #include <QScopedPointer> #include <QDebug> +#include <QDateTime> using namespace KFileMetaData; @@ -40,31 +41,29 @@ result->addType(Type::Document); if (result->inputFlags() & ExtractionResult::ExtractMetaData) { - QString title = pdfDoc->info(QStringLiteral("Title")).trimmed(); - + const QString title = pdfDoc->title(); if (!title.isEmpty()) { result->add(Property::Title, title); } - QString subject = pdfDoc->info(QStringLiteral("Subject")); + const QString subject = pdfDoc->subject(); if (!subject.isEmpty()) { result->add(Property::Subject, subject); } - QString author = pdfDoc->info(QStringLiteral("Author")); + const QString author = pdfDoc->author(); if (!author.isEmpty()) { result->add(Property::Author, author); } - QString generator = pdfDoc->info(QStringLiteral("Producer")); + const QString generator = pdfDoc->producer(); if (!generator.isEmpty()) { result->add(Property::Generator, generator); } - QString creationDate = pdfDoc->info(QStringLiteral("CreationDate")); - if (!creationDate.isEmpty()) { - QByteArray utf8 = creationDate.toUtf8(); - result->add(Property::CreationDate, Poppler::convertDate(utf8.data())); + const QDateTime creationDate = pdfDoc->creationDate(); + if (!creationDate.isNull()) { + result->add(Property::CreationDate, creationDate); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.87.0/src/extractors/postscriptdscextractor.cpp new/kfilemetadata-5.88.0/src/extractors/postscriptdscextractor.cpp --- old/kfilemetadata-5.87.0/src/extractors/postscriptdscextractor.cpp 2021-10-02 16:26:55.000000000 +0200 +++ new/kfilemetadata-5.88.0/src/extractors/postscriptdscextractor.cpp 2021-11-06 14:18:54.000000000 +0100 @@ -55,16 +55,19 @@ continue; } - if (line.startsWith(QLatin1String("%%Pages:"))) { + if (const auto tag = QLatin1String("%%Pages:"); line.startsWith(tag)) { bool ok = false; - int pages = line.midRef(8).toInt(&ok, 10); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + int pages = QStringView(line).mid(tag.size()).toInt(&ok, 10); +#else + int pages = line.midRef(tag.size()).toInt(&ok, 10); +#endif if (ok) { result->add(Property::PageCount, pages); } - } else if (line.startsWith(QLatin1String("%%Title:"))) { - QStringRef title = line.midRef(8); - title = title.trimmed(); + } else if (const auto tag = QLatin1String("%%Title:"); line.startsWith(tag)) { + QStringView title = QStringView(line).mid(tag.size()).trimmed(); if (title.startsWith(QLatin1Char('(')) && title.endsWith(QLatin1Char(')'))) { title = title.mid(1, title.size() - 2); } @@ -72,10 +75,9 @@ result->add(Property::Title, title.toString()); } - } else if (line.startsWith(QLatin1String("%%CreationDate:"))) { + } else if (const auto tag = QLatin1String("%%CreationDate:"); line.startsWith(tag)) { // "Neither the date nor time need be in any standard format." - QStringRef date = line.midRef(15); - date = date.trimmed(); + QStringView date = QStringView(line).mid(tag.size()).trimmed(); if (date.startsWith(QLatin1Char('(')) && date.endsWith(QLatin1Char(')'))) { date = date.mid(1, date.size() - 2); date = date.trimmed(); @@ -84,7 +86,7 @@ // Standard PDF date format, ASN.1 like - (D:YYYYMMDDHHmmSSOHH'mm') auto dt = QDateTime::fromString(date.mid(2, 14).toString(), QLatin1String("yyyyMMddhhmmss")); auto offset = QTime::fromString(date.mid(17, 5).toString(), QLatin1String("hh'\\''mm")); - if (date.mid(16,1) == QLatin1String("+")) { + if (date.at(16) == QLatin1Char('+')) { dt.setOffsetFromUtc(QTime(0, 0).secsTo(offset)); } else { dt.setOffsetFromUtc(-1 * QTime(0, 0).secsTo(offset)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kfilemetadata-5.87.0/src/writerplugin.h new/kfilemetadata-5.88.0/src/writerplugin.h --- old/kfilemetadata-5.87.0/src/writerplugin.h 2021-10-02 16:26:55.000000000 +0200 +++ new/kfilemetadata-5.88.0/src/writerplugin.h 2021-11-06 14:18:54.000000000 +0100 @@ -25,7 +25,7 @@ Q_OBJECT public: explicit WriterPlugin(QObject* parent); - virtual ~WriterPlugin(); + ~WriterPlugin() override; virtual QStringList writeMimetypes() const = 0;