Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kmbox for openSUSE:Factory checked in at 2021-04-24 23:07:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kmbox (Old) and /work/SRC/openSUSE:Factory/.kmbox.new.12324 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kmbox" Sat Apr 24 23:07:44 2021 rev:68 rq:887687 version:21.04.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kmbox/kmbox.changes 2021-03-08 15:13:30.525767129 +0100 +++ /work/SRC/openSUSE:Factory/.kmbox.new.12324/kmbox.changes 2021-04-24 23:08:31.951342151 +0200 @@ -1,0 +2,27 @@ +Fri Apr 16 16:12:13 UTC 2021 - Christophe Giboudeaux <[email protected]> + +- Update to 21.04.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/gear/21.04 +- No code change since 21.03.90 + +------------------------------------------------------------------- +Fri Apr 9 17:40:39 UTC 2021 - Christophe Giboudeaux <[email protected]> + +- Update to 21.03.90 + * New feature release +- No code change since 21.03.80 + +------------------------------------------------------------------- +Sun Mar 21 13:28:26 UTC 2021 - Christophe Giboudeaux <[email protected]> + +- Update to 21.03.80 + * New feature release +- Changes since 20.12.3: + * These repo doesn't have i18n =>not necessary + * Use git commit hook + * run git clang-format + * Use std::unique_ptr + +------------------------------------------------------------------- Old: ---- kmbox-20.12.3.tar.xz kmbox-20.12.3.tar.xz.sig New: ---- kmbox-21.04.0.tar.xz kmbox-21.04.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kmbox.spec ++++++ --- /var/tmp/diff_new_pack.VuN6J7/_old 2021-04-24 23:08:32.431342830 +0200 +++ /var/tmp/diff_new_pack.VuN6J7/_new 2021-04-24 23:08:32.431342830 +0200 @@ -16,26 +16,26 @@ # -%define kf5_version 5.75.0 +%define kf5_version 5.79.0 # Latest stable Applications (e.g. 17.08 in KA, but 17.11.80 in KUA) %{!?_kapp_version: %define _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')} %bcond_without lang Name: kmbox -Version: 20.12.3 +Version: 21.04.0 Release: 0 Summary: KDE PIM Libraries: Mailbox functionality License: LGPL-2.1-or-later Group: System/GUI/KDE URL: https://www.kde.org Source: https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz -BuildRequires: extra-cmake-modules >= 5.19.0 -BuildRequires: kf5-filesystem -BuildRequires: cmake(KF5Mime) -BuildRequires: cmake(Qt5Test) %if %{with lang} Source1: https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig Source2: applications.keyring %endif +BuildRequires: extra-cmake-modules +BuildRequires: kf5-filesystem +BuildRequires: cmake(KF5Mime) +BuildRequires: cmake(Qt5Test) %description This package contains the basic packages for KDE PIM applications. @@ -58,7 +58,7 @@ to develop KDE PIM applications. %prep -%setup -q -n kmbox-%{version} +%autosetup -p1 %build %cmake_kf5 -d build -- -DBUILD_TESTING=ON -DKF5_INCLUDE_INSTALL_DIR=%{_kf5_includedir} @@ -72,9 +72,9 @@ %files -n libKF5Mbox5 %license LICENSES/* -%{_kf5_libdir}/libKF5Mbox.so.* %{_kf5_debugdir}/*.categories %{_kf5_debugdir}/*.renamecategories +%{_kf5_libdir}/libKF5Mbox.so.* %files devel %license LICENSES/* ++++++ kmbox-20.12.3.tar.xz -> kmbox-21.04.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/.clang-format new/kmbox-21.04.0/.clang-format --- old/kmbox-20.12.3/.clang-format 1970-01-01 01:00:00.000000000 +0100 +++ new/kmbox-21.04.0/.clang-format 2021-04-11 13:07:17.000000000 +0200 @@ -0,0 +1,76 @@ +--- +# SPDX-FileCopyrightText: 2019 Christoph Cullmann <[email protected]> +# SPDX-FileCopyrightText: 2019 Gernot Gebhard <[email protected]> +# +# SPDX-License-Identifier: MIT + +# Style for C++ +Language: Cpp + +# base is WebKit coding style: https://webkit.org/code-style-guidelines/ +# below are only things set that diverge from this style! +BasedOnStyle: WebKit + +# enforce C++11 (e.g. for std::vector<std::vector<lala>> +Standard: Cpp11 + +# 4 spaces indent +TabWidth: 4 + +# 2 * 80 wide lines +ColumnLimit: 160 + +# sort includes inside line separated groups +SortIncludes: true + +# break before braces on function, namespace and class definitions. +BreakBeforeBraces: Linux + +# CrlInstruction *a; +PointerAlignment: Right + +# horizontally aligns arguments after an open bracket. +AlignAfterOpenBracket: Align + +# don't move all parameters to new line +AllowAllParametersOfDeclarationOnNextLine: false + +# no single line functions +AllowShortFunctionsOnASingleLine: None + +# always break before you encounter multi line strings +AlwaysBreakBeforeMultilineStrings: true + +# don't move arguments to own lines if they are not all on the same +BinPackArguments: false + +# don't move parameters to own lines if they are not all on the same +BinPackParameters: false + +# In case we have an if statement whith multiple lines the operator should be at the beginning of the line +# but we do not want to break assignments +BreakBeforeBinaryOperators: NonAssignment + +# format C++11 braced lists like function calls +Cpp11BracedListStyle: true + +# do not put a space before C++11 braced lists +SpaceBeforeCpp11BracedList: false + +# remove empty lines +KeepEmptyLinesAtTheStartOfBlocks: false + +# no namespace indentation to keep indent level low +NamespaceIndentation: None + +# we use template< without space. +SpaceAfterTemplateKeyword: false + +# macros for which the opening brace stays attached. +ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ] + +# keep lambda formatting multi-line if not empty +AllowShortLambdasOnASingleLine: Empty + +# We do not want clang-format to put all arguments on a new line +AllowAllArgumentsOnNextLine: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/.git-blame-ignore-revs new/kmbox-21.04.0/.git-blame-ignore-revs --- old/kmbox-20.12.3/.git-blame-ignore-revs 1970-01-01 01:00:00.000000000 +0100 +++ new/kmbox-21.04.0/.git-blame-ignore-revs 2021-04-11 13:07:17.000000000 +0200 @@ -0,0 +1,2 @@ +# clang-format +f18008304349f55a7bf2f03057bfeee90a942fbc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/.gitignore new/kmbox-21.04.0/.gitignore --- old/kmbox-20.12.3/.gitignore 2021-02-09 13:36:15.000000000 +0100 +++ new/kmbox-21.04.0/.gitignore 2021-04-11 13:07:17.000000000 +0200 @@ -18,3 +18,4 @@ .cmake/ CMakeLists.txt.user* *.unc-backup* +compile_commands.json diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/.gitlab-ci.yml new/kmbox-21.04.0/.gitlab-ci.yml --- old/kmbox-20.12.3/.gitlab-ci.yml 2021-02-09 13:36:15.000000000 +0100 +++ new/kmbox-21.04.0/.gitlab-ci.yml 2021-04-11 13:07:17.000000000 +0200 @@ -1,10 +1,14 @@ +# SPDX-FileCopyrightText: 2020-2021 Laurent Montel <[email protected]> +# SPDX-FileCopyrightText: 2021 Laurent Montel <[email protected]> +# SPDX-License-Identifier: CC0-1.0 + include: - https://invent.kde.org/sysadmin/ci-tooling/raw/master/invent/ci-before.yml - https://invent.kde.org/sysadmin/ci-tooling/raw/master/invent/ci-applications-linux.yml build_clazy_clang_tidy: stage: build - image: kdeorg/ci-suse-qt514 + image: kdeorg/ci-suse-qt515 extends: .linux #only: # - merge_requests @@ -26,5 +30,5 @@ - python3 -u $CI_TOOLING/helpers/compile-build.py --product $PRODUCT --project $PROJECT --branchGroup $BRANCH_GROUP --platform $PLATFORM --usingInstall $INSTALL_PREFIX - cd build && run-clang-tidy variables: - PLATFORM: SUSEQt5.14 + PLATFORM: SUSEQt5.15 BRANCH_GROUP: kf5-qt5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/CMakeLists.txt new/kmbox-21.04.0/CMakeLists.txt --- old/kmbox-20.12.3/CMakeLists.txt 2021-02-09 13:36:15.000000000 +0100 +++ new/kmbox-21.04.0/CMakeLists.txt 2021-04-11 13:07:17.000000000 +0200 @@ -1,10 +1,10 @@ -cmake_minimum_required(VERSION 3.5) -set(PIM_VERSION "5.16.3") +cmake_minimum_required(VERSION 3.5 FATAL_ERROR) +set(PIM_VERSION "5.17.0") project(KMbox VERSION ${PIM_VERSION}) # ECM setup -set(KF5_MIN_VERSION "5.75.0") +set(KF5_MIN_VERSION "5.79.0") find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) @@ -18,13 +18,14 @@ include(ECMSetupVersion) include(FeatureSummary) +include(KDEGitCommitHooks) include(ECMQtDeclareLoggingCategory) set(KMBOX_LIB_VERSION ${PIM_VERSION}) -set(KMIME_LIB_VERSION "5.16.3") +set(KMIME_LIB_VERSION "5.17.0") ecm_setup_version(PROJECT VARIABLE_PREFIX KMBOX VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kmbox_version.h" @@ -36,13 +37,20 @@ find_package(KF5Mime ${KMIME_LIB_VERSION} CONFIG REQUIRED) add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00) -add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054C00) +add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055000) -add_definitions(-DQT_NO_FOREACH) -add_definitions(-DQT_NO_KEYWORDS) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) +option(USE_UNITY_CMAKE_SUPPORT "Use UNITY cmake support (speedup compile time)" FALSE) +set(COMPILE_WITH_UNITY_CMAKE_SUPPORT false) +if (USE_UNITY_CMAKE_SUPPORT) + if(${CMAKE_VERSION} VERSION_LESS "3.16.0") + message(STATUS "CMAKE version is less than 3.16.0 . We can't use cmake unify build support") + else() + set(COMPILE_WITH_UNITY_CMAKE_SUPPORT true) + endif() +endif() ########### Targets ########### add_subdirectory(src) @@ -74,4 +82,5 @@ COMPONENT Devel ) +kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/CMakePresets.json new/kmbox-21.04.0/CMakePresets.json --- old/kmbox-20.12.3/CMakePresets.json 1970-01-01 01:00:00.000000000 +0100 +++ new/kmbox-21.04.0/CMakePresets.json 2021-04-11 13:07:17.000000000 +0200 @@ -0,0 +1,56 @@ +{ + "version": 1, + "configurePresets": [ + { + "name": "dev", + "displayName": "Build as debug", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" + } + }, + { + "name": "asan", + "displayName": "Build with Asan support.", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build-asan", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "ECM_ENABLE_SANITIZERS" : "'address;undefined'", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" + } + }, + { + "name": "unity", + "displayName": "Build with CMake unity support.", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build-unity", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "USE_UNITY_CMAKE_SUPPORT": "ON", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" + } + }, + { + "name": "release", + "displayName": "Build as release mode.", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build-release", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "profile", + "displayName": "profile", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build-profile", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" + } + } + ] +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/CMakePresets.json.license new/kmbox-21.04.0/CMakePresets.json.license --- old/kmbox-20.12.3/CMakePresets.json.license 1970-01-01 01:00:00.000000000 +0100 +++ new/kmbox-21.04.0/CMakePresets.json.license 2021-04-11 13:07:17.000000000 +0200 @@ -0,0 +1,2 @@ +# SPDX-FileCopyrightText: 2021 Laurent Montel <[email protected]> +# SPDX-License-Identifier: BSD-3-Clause diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/LICENSES/CC0-1.0.txt new/kmbox-21.04.0/LICENSES/CC0-1.0.txt --- old/kmbox-20.12.3/LICENSES/CC0-1.0.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/kmbox-21.04.0/LICENSES/CC0-1.0.txt 2021-04-11 13:07:17.000000000 +0200 @@ -0,0 +1,119 @@ +Creative Commons Legal Code + +CC0 1.0 Universal CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES +NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE +AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION +ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE +OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS +LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION +OR WORKS PROVIDED HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer exclusive +Copyright and Related Rights (defined below) upon the creator and subsequent +owner(s) (each and all, an "owner") of an original work of authorship and/or +a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later claims +of infringement build upon, modify, incorporate in other works, reuse and +redistribute as freely as possible in any form whatsoever and for any purposes, +including without limitation commercial purposes. These owners may contribute +to the Commons to promote the ideal of a free culture and the further production +of creative, cultural and scientific works, or to gain reputation or greater +distribution for their Work in part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with +a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or +her Copyright and Related Rights in the Work and the meaning and intended +legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be protected +by copyright and related or neighboring rights ("Copyright and Related Rights"). +Copyright and Related Rights include, but are not limited to, the following: + +i. the right to reproduce, adapt, distribute, perform, display, communicate, +and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + +iii. publicity and privacy rights pertaining to a person's image or likeness +depicted in a Work; + +iv. rights protecting against unfair competition in regards to a Work, subject +to the limitations in paragraph 4(a), below; + +v. rights protecting the extraction, dissemination, use and reuse of data +in a Work; + +vi. database rights (such as those arising under Directive 96/9/EC of the +European Parliament and of the Council of 11 March 1996 on the legal protection +of databases, and under any national implementation thereof, including any +amended or successor version of such directive); and + +vii. other similar, equivalent or corresponding rights throughout the world +based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time extensions), +(iii) in any current or future medium and for any number of copies, and (iv) +for any purpose whatsoever, including without limitation commercial, advertising +or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the +benefit of each member of the public at large and to the detriment of Affirmer's +heirs and successors, fully intending that such Waiver shall not be subject +to revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account Affirmer's +express Statement of Purpose. In addition, to the extent the Waiver is so +judged Affirmer hereby grants to each affected person a royalty-free, non +transferable, non sublicensable, non exclusive, irrevocable and unconditional +license to exercise Affirmer's Copyright and Related Rights in the Work (i) +in all territories worldwide, (ii) for the maximum duration provided by applicable +law or treaty (including future time extensions), (iii) in any current or +future medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional purposes +(the "License"). The License shall be deemed effective as of the date CC0 +was applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder of +the License, and in such case Affirmer hereby affirms that he or she will +not (i) exercise any of his or her remaining Copyright and Related Rights +in the Work or (ii) assert any associated claims and causes of action with +respect to the Work, in either case contrary to Affirmer's express Statement +of Purpose. + + 4. Limitations and Disclaimers. + +a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, +licensed or otherwise affected by this document. + +b. Affirmer offers the Work as-is and makes no representations or warranties +of any kind concerning the Work, express, implied, statutory or otherwise, +including without limitation warranties of title, merchantability, fitness +for a particular purpose, non infringement, or the absence of latent or other +defects, accuracy, or the present or absence of errors, whether or not discoverable, +all to the greatest extent permissible under applicable law. + +c. Affirmer disclaims responsibility for clearing rights of other persons +that may apply to the Work or any use thereof, including without limitation +any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims +responsibility for obtaining any necessary consents, permissions or other +rights required for any use of the Work. + +d. Affirmer understands and acknowledges that Creative Commons is not a party +to this document and has no duty or obligation with respect to this CC0 or +use of the Work. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/autotests/mboxbenchmark.cpp new/kmbox-21.04.0/autotests/mboxbenchmark.cpp --- old/kmbox-20.12.3/autotests/mboxbenchmark.cpp 2021-02-09 13:36:15.000000000 +0100 +++ new/kmbox-21.04.0/autotests/mboxbenchmark.cpp 2021-04-11 13:07:17.000000000 +0200 @@ -8,8 +8,8 @@ #include <QCryptographicHash> -#include <QTest> #include <QTemporaryDir> +#include <QTest> QTEST_MAIN(MBoxBenchmark) @@ -83,7 +83,7 @@ MBox mbox2; mbox2.setLockType(MBox::ProcmailLockfile); mbox2.load(fileName()); - mbox2.setUnlockTimeout(5000); // Keep the mbox locked for five seconds. + mbox2.setUnlockTimeout(5000); // Keep the mbox locked for five seconds. const auto lst = mbox2.entries(); for (const MBoxEntry &entry : lst) { @@ -113,8 +113,7 @@ QCryptographicHash hash(QCryptographicHash::Md5); qint64 blockSize = 512 * 1024; // Read blocks of 512K - while (!file.atEnd()) - { + while (!file.atEnd()) { hash.addData(file.read(blockSize)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/autotests/mboxtest.cpp new/kmbox-21.04.0/autotests/mboxtest.cpp --- old/kmbox-20.12.3/autotests/mboxtest.cpp 2021-02-09 13:36:15.000000000 +0100 +++ new/kmbox-21.04.0/autotests/mboxtest.cpp 2021-04-11 13:07:17.000000000 +0200 @@ -9,9 +9,9 @@ #include <QDir> #include <QFile> -#include <QTest> #include <QStandardPaths> #include <QTemporaryDir> +#include <QTest> QTEST_MAIN(MboxTest) @@ -143,7 +143,7 @@ QVERIFY(false); } - ThreadFillsMBox thread(fileName()); // locks the mbox file and adds a new message + ThreadFillsMBox thread(fileName()); // locks the mbox file and adds a new message thread.start(); QVERIFY(mbox.load(fileName())); @@ -327,7 +327,7 @@ infos2 = mbox1.entries(deletedEntries); QCOMPARE(infos2.size(), 0); - QVERIFY(!deletedEntries.contains(MBoxEntry(10))); // some random offset + QVERIFY(!deletedEntries.contains(MBoxEntry(10))); // some random offset infos2 = mbox1.entries(MBoxEntry::List() << MBoxEntry(10)); QCOMPARE(infos2.size(), 3); QCOMPARE(infos2.at(0), infos.at(0)); @@ -353,7 +353,7 @@ MBox mbox2; QVERIFY(mbox2.load(fileName())); MBoxEntry::List list2 = mbox2.entries(); - QCOMPARE(list2.size(), 2); // Is a message actually gone? + QCOMPARE(list2.size(), 2); // Is a message actually gone? quint64 newOffsetSecondMessage = list.last().messageOffset() - list.at(1).messageOffset(); @@ -374,7 +374,7 @@ mbox1.purge(MBoxEntry::List() << list.at(0) << list.at(1)); QVERIFY(mbox2.load(fileName())); list2 = mbox2.entries(); - QCOMPARE(list2.size(), 1); // Are the messages actually gone? + QCOMPARE(list2.size(), 1); // Are the messages actually gone? QCOMPARE(list2.first().messageOffset(), static_cast<quint64>(0)); // Third test: Delete all messages. @@ -391,7 +391,7 @@ mbox1.purge(MBoxEntry::List() << list.at(0) << list.at(1) << list.at(2)); QVERIFY(mbox2.load(fileName())); list2 = mbox2.entries(); - QCOMPARE(list2.size(), 0); // Are the messages actually gone? + QCOMPARE(list2.size(), 0); // Are the messages actually gone? } void MboxTest::testLockTimeout() @@ -461,7 +461,7 @@ // this still works since we could save it to a different file MBoxEntry entry = mbox.appendMessage(mMail1); - QVERIFY(!mbox.save()); // original mbox is read-only + QVERIFY(!mbox.save()); // original mbox is read-only // reading back the appended message (from memory) QByteArray msg = mbox.readRawMessage(entry); @@ -472,10 +472,10 @@ msg = mbox.readRawMessage(list.at(0)); QVERIFY(!msg.isEmpty()); - QVERIFY(!mbox.purge(list)); // original mbox is read-only + QVERIFY(!mbox.purge(list)); // original mbox is read-only QString tmpSaved = mTempDir->path() + QLatin1String("tempSaved.mbox"); - QVERIFY(mbox.save(tmpSaved)); // other mbox file can be written + QVERIFY(mbox.save(tmpSaved)); // other mbox file can be written MBox savedMbox; savedMbox.setReadOnly(); @@ -511,8 +511,7 @@ file.open(QIODevice::WriteOnly | QIODevice::Append); QByteArray message = KMime::CRLFtoLF(sEntry1); - file.write(QByteArray("From [email protected] ") - +QDateTime::currentDateTime().toString(Qt::ISODate).toUtf8() + "\n"); + file.write(QByteArray("From [email protected] ") + QDateTime::currentDateTime().toString(Qt::ISODate).toUtf8() + "\n"); file.write(message); file.write("\n\n"); file.close(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/sanitizers.supp new/kmbox-21.04.0/sanitizers.supp --- old/kmbox-20.12.3/sanitizers.supp 1970-01-01 01:00:00.000000000 +0100 +++ new/kmbox-21.04.0/sanitizers.supp 2021-04-11 13:07:17.000000000 +0200 @@ -0,0 +1,14 @@ +# Suppression file for ASAN/LSAN + +leak:libspeechd +leak:getdelim +leak:g_malloc +leak:libfontconfig +leak:libdbus +leak:QEasingCurve:: +leak:QtSharedPointer::ExternalRefCountData::getAndRef +leak:QArrayData::allocate +leak:QObject::QObject +leak:QObjectPrivate::addConnection +leak:QObjectPrivate::connectImpl +leak:QPropertyAnimation::QPropertyAnimation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/src/CMakeLists.txt new/kmbox-21.04.0/src/CMakeLists.txt --- old/kmbox-20.12.3/src/CMakeLists.txt 2021-02-09 13:36:15.000000000 +0100 +++ new/kmbox-21.04.0/src/CMakeLists.txt 2021-04-11 13:07:17.000000000 +0200 @@ -11,11 +11,13 @@ add_library(KF5Mbox ${kmbox_SRCS}) +if (COMPILE_WITH_UNITY_CMAKE_SUPPORT) + set_target_properties(KF5Mbox PROPERTIES UNITY_BUILD ON) +endif() generate_export_header(KF5Mbox BASE_NAME kmbox) add_library(KF5::Mbox ALIAS KF5Mbox) - target_include_directories(KF5Mbox INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KMbox>") target_include_directories(KF5Mbox PUBLIC "$<BUILD_INTERFACE:${KMbox_SOURCE_DIR}/src;${KMbox_BINARY_DIR}/src>") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/src/mbox.cpp new/kmbox-21.04.0/src/mbox.cpp --- old/kmbox-20.12.3/src/mbox.cpp 2021-02-09 13:36:15.000000000 +0100 +++ new/kmbox-21.04.0/src/mbox.cpp 2021-04-11 13:07:17.000000000 +0200 @@ -42,8 +42,6 @@ } d->close(); - - delete d; } // Appended entries works as follows: When an mbox file is loaded from disk, @@ -58,8 +56,7 @@ const QByteArray rawEntry = MBoxPrivate::escapeFrom(entry->encodedContent()); if (rawEntry.size() <= 0) { - qCDebug(KMBOX_LOG) << "Message added to folder `" << d->mMboxFile.fileName() - << "' contains no data. Ignoring it."; + qCDebug(KMBOX_LOG) << "Message added to folder `" << d->mMboxFile.fileName() << "' contains no data. Ignoring it."; return MBoxEntry(); } @@ -67,7 +64,7 @@ // Make sure the byte array is large enough to check for an end character. // Then check if the required newlines are there. - if (nextOffset < 1 && d->mMboxFile.size() > 0) { // Empty, add one empty line + if (nextOffset < 1 && d->mMboxFile.size() > 0) { // Empty, add one empty line d->mAppendedEntries.append("\n"); ++nextOffset; } else if (nextOffset == 1 && d->mAppendedEntries.at(0) != '\n') { @@ -143,7 +140,7 @@ return false; } - d->mInitialMboxFileSize = d->mMboxFile.size(); // AFTER the file has been locked + d->mInitialMboxFileSize = d->mMboxFile.size(); // AFTER the file has been locked QByteArray line; QByteArray prevSeparator; @@ -156,8 +153,7 @@ // if atEnd, use mail only if there was a separator line at all, // otherwise it's not a valid mbox - if (d->isMBoxSeparator(line) - || (d->mMboxFile.atEnd() && (prevSeparator.size() != 0))) { + if (d->isMBoxSeparator(line) || (d->mMboxFile.atEnd() && (prevSeparator.size() != 0))) { // if we are the at the file end, update pos to not forget the last line if (d->mMboxFile.atEnd()) { pos = d->mMboxFile.pos(); @@ -226,14 +222,12 @@ if (!d->mLockFileName.isEmpty()) { args << QString::fromLocal8Bit(QFile::encodeName(d->mLockFileName)); } else { - args << QString::fromLocal8Bit(QFile::encodeName(d->mMboxFile.fileName() - +QLatin1String(".lock"))); + args << QString::fromLocal8Bit(QFile::encodeName(d->mMboxFile.fileName() + QLatin1String(".lock"))); } rc = QProcess::execute(QStringLiteral("lockfile"), args); if (rc != 0) { - qCDebug(KMBOX_LOG) << "lockfile -l20 -r5 " << d->mMboxFile.fileName() - << ": Failed (" << rc << ") switching to read only mode"; + qCDebug(KMBOX_LOG) << "lockfile -l20 -r5 " << d->mMboxFile.fileName() << ": Failed (" << rc << ") switching to read only mode"; d->mReadOnly = true; // In case the MBox object was created read/write we // set it to read only when locking failed. } else { @@ -246,8 +240,7 @@ rc = QProcess::execute(QStringLiteral("mutt_dotlock"), args); if (rc != 0) { - qCDebug(KMBOX_LOG) << "mutt_dotlock " << d->mMboxFile.fileName() - << ": Failed (" << rc << ") switching to read only mode"; + qCDebug(KMBOX_LOG) << "mutt_dotlock " << d->mMboxFile.fileName() << ": Failed (" << rc << ") switching to read only mode"; d->mReadOnly = true; // In case the MBox object was created read/write we // set it to read only when locking failed. } else { @@ -256,8 +249,7 @@ break; case MuttDotlockPrivileged: - args << QStringLiteral("-p") - << QString::fromLocal8Bit(QFile::encodeName(d->mMboxFile.fileName())); + args << QStringLiteral("-p") << QString::fromLocal8Bit(QFile::encodeName(d->mMboxFile.fileName())); rc = QProcess::execute(QStringLiteral("mutt_dotlock"), args); if (rc != 0) { @@ -279,8 +271,8 @@ if (d->mFileLocked) { if (!d->open()) { const bool unlocked = unlock(); - Q_ASSERT(unlocked); // If this fails we're in trouble. - Q_UNUSED(unlocked); + Q_ASSERT(unlocked); // If this fails we're in trouble. + Q_UNUSED(unlocked) } } @@ -346,9 +338,7 @@ if (deletedEntries.contains(entry) && !writeOffSetInitialized) { writeOffset = entry.messageOffset(); writeOffSetInitialized = true; - } else if (writeOffSetInitialized - && writeOffset < entry.messageOffset() - && !deletedEntries.contains(entry)) { + } else if (writeOffSetInitialized && writeOffset < entry.messageOffset() && !deletedEntries.contains(entry)) { // The current message doesn't have to be deleted, but must be moved. // First determine the size of the entry that must be moved. quint64 entrySize = 0; @@ -359,7 +349,7 @@ entrySize = origFileSize - entry.messageOffset(); } - Q_ASSERT(entrySize > 0); // MBox entries really cannot have a size <= 0; + Q_ASSERT(entrySize > 0); // MBox entries really cannot have a size <= 0; // we map the whole area of the file starting at the writeOffset up to the // message that have to be moved into memory. This includes eventually the @@ -382,8 +372,7 @@ resultEntry.d->mMessageSize = entry.messageSize(); resultingEntryList << resultEntry; - tmpMovedEntries << MBoxEntry::Pair(MBoxEntry(entry.messageOffset()), - MBoxEntry(resultEntry.messageOffset())); + tmpMovedEntries << MBoxEntry::Pair(MBoxEntry(entry.messageOffset()), MBoxEntry(resultEntry.messageOffset())); writeOffset += entrySize; } else if (!deletedEntries.contains(entry)) { // Unmoved and not deleted entry, can only ocure before the first deleted @@ -486,7 +475,7 @@ if (!d->startTimerIfNeeded()) { const bool unlocked = unlock(); Q_ASSERT(unlocked); - Q_UNUSED(unlocked); + Q_UNUSED(unlocked) } } @@ -662,14 +651,12 @@ break; case MuttDotlock: - args << QStringLiteral("-u") - << QString::fromLocal8Bit(QFile::encodeName(d->mMboxFile.fileName())); + args << QStringLiteral("-u") << QString::fromLocal8Bit(QFile::encodeName(d->mMboxFile.fileName())); rc = QProcess::execute(QStringLiteral("mutt_dotlock"), args); break; case MuttDotlockPrivileged: - args << QStringLiteral("-u") << QStringLiteral("-p") - << QString::fromLocal8Bit(QFile::encodeName(d->mMboxFile.fileName())); + args << QStringLiteral("-u") << QStringLiteral("-p") << QString::fromLocal8Bit(QFile::encodeName(d->mMboxFile.fileName())); rc = QProcess::execute(QStringLiteral("mutt_dotlock"), args); break; @@ -678,7 +665,7 @@ break; } - if (rc == 0) { // Unlocking succeeded + if (rc == 0) { // Unlocking succeeded d->mFileLocked = false; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/src/mbox.h new/kmbox-21.04.0/src/mbox.h --- old/kmbox-20.12.3/src/mbox.h 2021-02-09 13:36:15.000000000 +0100 +++ new/kmbox-21.04.0/src/mbox.h 2021-04-11 13:07:17.000000000 +0200 @@ -9,10 +9,12 @@ #include "kmbox_export.h" #include "mboxentry.h" +#include <memory> #include <kmime/kmime_message.h> -namespace KMBox { +namespace KMBox +{ class MBoxPrivate; /** @@ -27,12 +29,7 @@ /** * Describes the type of locking that will be used. */ - enum LockType { - ProcmailLockfile, - MuttDotlock, - MuttDotlockPrivileged, - None - }; + enum LockType { ProcmailLockfile, MuttDotlock, MuttDotlockPrivileged, None }; /** * Creates a new mbox object. @@ -245,8 +242,7 @@ private: //@cond PRIVATE Q_DISABLE_COPY(MBox) - friend class MBoxPrivate; - MBoxPrivate *const d; + std::unique_ptr<class MBoxPrivate> const d; //@endcond }; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/src/mbox_p.cpp new/kmbox-21.04.0/src/mbox_p.cpp --- old/kmbox-20.12.3/src/mbox_p.cpp 2021-02-09 13:36:15.000000000 +0100 +++ new/kmbox-21.04.0/src/mbox_p.cpp 2021-04-11 13:07:17.000000000 +0200 @@ -7,8 +7,8 @@ #include "mbox_p.h" #include "kmbox_debug.h" -#include <QUrl> #include <QLocale> +#include <QUrl> using namespace KMBox; @@ -30,16 +30,15 @@ bool MBoxPrivate::open() { if (mMboxFile.isOpen()) { - return true; // already open + return true; // already open } QIODevice::OpenMode mode = mReadOnly ? QIODevice::ReadOnly : QIODevice::ReadWrite; - if (!mMboxFile.open(mode)) { // messages file + if (!mMboxFile.open(mode)) { // messages file // failed to open readWrite -> try to open readOnly if (!mMboxFile.open(QIODevice::ReadOnly)) { - qCDebug(KMBOX_LOG) << "Cannot open mbox file `" << mMboxFile.fileName() << "' FileError:" - << mMboxFile.errorString(); + qCDebug(KMBOX_LOG) << "Cannot open mbox file `" << mMboxFile.fileName() << "' FileError:" << mMboxFile.errorString(); return false; } else { mReadOnly = true; @@ -112,7 +111,7 @@ return separator; } -#define STRDIM(x) (sizeof(x)/sizeof(*x)-1) +#define STRDIM(x) (sizeof(x) / sizeof(*x) - 1) QByteArray MBoxPrivate::escapeFrom(const QByteArray &str) { @@ -178,10 +177,10 @@ const char *const e = str + strLen - STRDIM(">From "); while (s < e) { - if (*s == '\n' && *(s + 1) == '>') { // we can do the lookahead, + if (*s == '\n' && *(s + 1) == '>') { // we can do the lookahead, // since e is 6 chars from the end! - *d++ = *s++; // == '\n' - *d++ = *s++; // == '>' + *d++ = *s++; // == '\n' + *d++ = *s++; // == '>' while (s < e && *s == '>') { *d++ = *s++; @@ -199,14 +198,14 @@ *d++ = *s++; } - if (d < s) { // only NUL-terminate if it's shorter + if (d < s) { // only NUL-terminate if it's shorter *d = 0; } } bool MBoxPrivate::isMBoxSeparator(const QByteArray &line) const { - if (!line.startsWith("From ")) { //krazy:exclude=strings + if (!line.startsWith("From ")) { // krazy:exclude=strings return false; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/src/mbox_p.h new/kmbox-21.04.0/src/mbox_p.h --- old/kmbox-20.12.3/src/mbox_p.h 2021-02-09 13:36:15.000000000 +0100 +++ new/kmbox-21.04.0/src/mbox_p.h 2021-04-11 13:07:17.000000000 +0200 @@ -13,7 +13,8 @@ #include <QObject> #include <QTimer> -namespace KMBox { +namespace KMBox +{ class MBoxPrivate : public QObject { Q_OBJECT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/src/mboxentry.h new/kmbox-21.04.0/src/mboxentry.h --- old/kmbox-20.12.3/src/mboxentry.h 2021-02-09 13:36:15.000000000 +0100 +++ new/kmbox-21.04.0/src/mboxentry.h 2021-04-11 13:07:17.000000000 +0200 @@ -9,11 +9,12 @@ #include "kmbox_export.h" -#include <QVector> #include <QPair> #include <QSharedDataPointer> +#include <QVector> -namespace KMBox { +namespace KMBox +{ class MBoxEntryPrivate; /** * @short A class that encapsulates an entry of a MBox. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-20.12.3/src/mboxentry_p.h new/kmbox-21.04.0/src/mboxentry_p.h --- old/kmbox-20.12.3/src/mboxentry_p.h 2021-02-09 13:36:15.000000000 +0100 +++ new/kmbox-21.04.0/src/mboxentry_p.h 2021-04-11 13:07:17.000000000 +0200 @@ -9,7 +9,8 @@ #include <QSharedData> -namespace KMBox { +namespace KMBox +{ class MBoxEntryPrivate : public QSharedData { public:
