Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kmbox for openSUSE:Factory checked in at 2026-04-17 21:48:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kmbox (Old) and /work/SRC/openSUSE:Factory/.kmbox.new.11940 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kmbox" Fri Apr 17 21:48:00 2026 rev:127 rq:1347470 version:26.04.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kmbox/kmbox.changes 2026-03-07 20:03:42.260424869 +0100 +++ /work/SRC/openSUSE:Factory/.kmbox.new.11940/kmbox.changes 2026-04-17 21:49:01.884468301 +0200 @@ -1,0 +2,45 @@ +Sat Apr 11 16:14:09 UTC 2026 - Christophe Marin <[email protected]> + +- Update to 26.04.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/gear/26.04.0/ +- No code change since 26.03.90 + +------------------------------------------------------------------- +Mon Mar 30 12:10:31 UTC 2026 - Christophe Marin <[email protected]> + +- Update to 26.03.90 + * New feature release +- No code change since 26.03.80 + +------------------------------------------------------------------- +Sat Mar 14 09:09:39 UTC 2026 - Christophe Marin <[email protected]> + +- Update to 26.03.80 + * New feature release +- Changes since 25.12.3: + * Drop voidTestMD5Performance + * REUSE.html - add .gersemirc + * gersemi fixes - cmake linting and formatting + * Add lsan support + * Add clazy support + * Warnings are errors support + * cmake_minimum_required: drop outdated FATAL_ERROR. + * Make readMessage return unique_ptr + * Documentation fixes + * Add -Wshadow for clang-based builds + * Add inheaderfile + * Show class + * Use namespace + * Add missing explicit + * Add CMakePreset for generating doc + * Port to qdoc + * Make sure that we don't add deprecated code + * Use std::shared_ptr instead of QSharedPointer + * Port away from kmime deprecated API + * Port away from kmime deprecated typedefs + * Add default ClangBuildAnalyzer.ini (testing compile time) + * Add missing USE_UNITY_CMAKE_SUPPORT variable for building as unity from cmakepreset + +------------------------------------------------------------------- Old: ---- kmbox-25.12.3.tar.xz kmbox-25.12.3.tar.xz.sig New: ---- kmbox-26.04.0.tar.xz kmbox-26.04.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kmbox.spec ++++++ --- /var/tmp/diff_new_pack.BAUo6u/_old 2026-04-17 21:49:04.472574936 +0200 +++ /var/tmp/diff_new_pack.BAUo6u/_new 2026-04-17 21:49:04.480575265 +0200 @@ -1,7 +1,7 @@ # # spec file for package kmbox # -# Copyright (c) 2025 SUSE LLC and contributors +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,11 +18,11 @@ %define kf6_version 6.19.0 %define qt6_version 6.9.0 -%define kpim6_version 6.6.3 +%define kpim6_version 6.7.0 %bcond_without released Name: kmbox -Version: 25.12.3 +Version: 26.04.0 Release: 0 Summary: KDE PIM Libraries: Mailbox functionality License: LGPL-2.1-or-later @@ -32,10 +32,8 @@ Source1: https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig Source2: applications.keyring %endif -BuildRequires: doxygen BuildRequires: kf6-extra-cmake-modules >= %{kf6_version} BuildRequires: cmake(KPim6Mime) >= %{kpim6_version} -BuildRequires: cmake(Qt6ToolsTools) >= %{qt6_version} Conflicts: libKF6MBox5 < %{version} %description @@ -63,7 +61,7 @@ %autosetup -p1 %build -%cmake_kf6 -DBUILD_QCH:BOOL=TRUE +%cmake_kf6 %kf6_build @@ -81,7 +79,6 @@ %{_kf6_libdir}/libKPim6Mbox.so.* %files devel -%doc %{_kf6_qchdir}/KPim6Mbox.* %{_includedir}/KPim6/KMbox/ %{_kf6_cmakedir}/KPim6Mbox/ %{_kf6_libdir}/libKPim6Mbox.so ++++++ kmbox-25.12.3.tar.xz -> kmbox-26.04.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/.codespellrc.license new/kmbox-26.04.0/.codespellrc.license --- old/kmbox-25.12.3/.codespellrc.license 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/.codespellrc.license 2026-03-29 09:51:45.000000000 +0200 @@ -1,2 +1,2 @@ -# SPDX-FileCopyrightText: 2022-2025 Laurent Montel <[email protected]> +# SPDX-FileCopyrightText: 2022-2026 Laurent Montel <[email protected]> # SPDX-License-Identifier: CC0-1.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/.gersemirc new/kmbox-26.04.0/.gersemirc --- old/kmbox-25.12.3/.gersemirc 1970-01-01 01:00:00.000000000 +0100 +++ new/kmbox-26.04.0/.gersemirc 2026-03-29 09:51:45.000000000 +0200 @@ -0,0 +1,4 @@ +indent: 4 +line_length: 120 +list_expansion: favour-expansion +warn_about_unknown_commands: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/.gitignore new/kmbox-26.04.0/.gitignore --- old/kmbox-25.12.3/.gitignore 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/.gitignore 2026-03-29 09:51:45.000000000 +0200 @@ -29,3 +29,4 @@ Testing/ /.vscode/ .qtcreator/ +.sentry-native/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/.gitlab-ci.yml new/kmbox-26.04.0/.gitlab-ci.yml --- old/kmbox-25.12.3/.gitlab-ci.yml 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/.gitlab-ci.yml 2026-03-29 09:51:45.000000000 +0200 @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2020-2025 Laurent Montel <[email protected]> +# SPDX-FileCopyrightText: 2020-2026 Laurent Montel <[email protected]> # SPDX-License-Identifier: CC0-1.0 include: @@ -14,3 +14,24 @@ - /gitlab-templates/alpine-qt6.yml - /gitlab-templates/yaml-lint.yml - /gitlab-templates/pre-commit.yml + +build_clazy: + extends: + - .ci_linux_base + - .suse_tumbleweed_qt6stable + rules: + # only run on merge requests + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + variables: + CLAZY_CHECKS: level0,level1,qstring-allocations,no-qstring-arg,no-connect-not-normalized,no-fully-qualified-moc-types,no-const-signal-or-slot,no-qproperty-without-notify,no-incorrect-emit,no-connect-3arg-lambda,no-range-loop-reference,no-wrong-qevent-cast,no-detaching-temporary,no-child-event-qobject-cast + CC: clang + CXX: clazy + script: + - git config --global --add safe.directory $CI_PROJECT_DIR + - python3 -u ci-utilities/run-ci-build.py --project $CI_PROJECT_NAME --branch $CI_COMMIT_REF_NAME --platform Linux/Qt6/Shared --only-setup-environment + - mkdir -p /tmp/$CI_PROJECT_NAME-build + - cd /tmp/$CI_PROJECT_NAME-build + # we don't care about clazy issues in tests + - cmake -DENABLE_PCH=OFF -DBUILD_TESTING=OFF -G Ninja -DCMAKE_INSTALL_PREFIX=$CI_PROJECT_DIR/_install -DKF_SKIP_PO_PROCESSING=True -DKF6DocTools_FOUND=false $CI_PROJECT_DIR + - ninja -k 0 + artifacts: null diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/.kde-ci.yml new/kmbox-26.04.0/.kde-ci.yml --- old/kmbox-25.12.3/.kde-ci.yml 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/.kde-ci.yml 2026-03-29 09:51:45.000000000 +0200 @@ -11,3 +11,4 @@ require-passing-tests-on: ['Linux', 'FreeBSD', 'Windows'] tests-run-in-parallel: True cppcheck-arguments: '--enable=warning,performance,portability,style --suppress-xml=cppcheck-suppressions.xml' + enable-lsan: True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/.pre-commit-config.yaml new/kmbox-26.04.0/.pre-commit-config.yaml --- old/kmbox-25.12.3/.pre-commit-config.yaml 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/.pre-commit-config.yaml 2026-03-29 09:51:45.000000000 +0200 @@ -6,7 +6,7 @@ exclude: (^po/|.desktop|Messages.sh) repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -21,7 +21,7 @@ - id: destroyed-symlinks - id: check-executables-have-shebangs - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v20.1.4 + rev: v21.1.8 hooks: - id: clang-format # force using this project's configuration rather @@ -29,7 +29,7 @@ args: [--style=file:.clang-format-pre-commit] - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.11.9 + rev: v0.15.0 hooks: # Run the linter. - id: ruff @@ -41,19 +41,19 @@ - id: codespell exclude: (textemoticons/core/data/emoji.json|textgrammarcheck/grammalecte/autotests/data/result1.json|texttranslator/translator/plugins/bergamot/autotests/data/modellanguages/models.json|textgrammarcheck/languagetool/autotests/data/test2.json|textautocorrection/core/autotests/data/custom-fr-ref.xml|textgrammarcheck/common/autotests/grammarresultutiltest.cpp|textautocorrection/core/autotests/data/custom-fr.xml) - repo: https://github.com/BlankSpruce/gersemi - rev: 0.19.3 + rev: 0.25.4 hooks: - id: gersemi - repo: https://github.com/DavidAnson/markdownlint-cli2 - rev: v0.18.1 + rev: v0.20.0 hooks: - id: markdownlint-cli2 files: \.(md|mdown|markdown)$ - repo: https://github.com/scop/pre-commit-shfmt - rev: v3.11.0-1 + rev: v3.12.0-2 hooks: - id: shfmt - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.10.0.1 + rev: v0.11.0.1 hooks: - id: shellcheck diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/CMakeLists.txt new/kmbox-26.04.0/CMakeLists.txt --- old/kmbox-25.12.3/CMakeLists.txt 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/CMakeLists.txt 2026-03-29 09:51:45.000000000 +0200 @@ -1,14 +1,14 @@ # SPDX-FileCopyrightText: none # SPDX-License-Identifier: BSD-3-Clause -cmake_minimum_required(VERSION 3.16 FATAL_ERROR) -set(PIM_VERSION "6.6.3") +cmake_minimum_required(VERSION 3.27) +set(PIM_VERSION "6.7.0") project(KMbox VERSION ${PIM_VERSION}) # ECM setup -set(KF_MIN_VERSION "6.18.0") -set(QT_REQUIRED_VERSION "6.8.0") +set(KF_MIN_VERSION "6.22.0") +set(QT_REQUIRED_VERSION "6.9.0") find_package(ECM ${KF_MIN_VERSION} CONFIG REQUIRED) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) set(CMAKE_CXX_SCAN_FOR_MODULES OFF) @@ -28,40 +28,67 @@ autotests/*.cpp autotests/*.h ) -set(PRE_COMMIT_INSTALLED FALSE) -if(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) - if(EXISTS "${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit") - file(READ "${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit" FILE_CONTENTS) - string(FIND "${FILE_CONTENTS}" "File generated by pre-commit" INDEX) - if(${INDEX} GREATER_EQUAL 0) - set(PRE_COMMIT_INSTALLED TRUE) +if(EXISTS "${PROJECT_SOURCE_DIR}/.git/") + set(GIT_SOURCE_TARBALL TRUE) +endif() + +if(GIT_SOURCE_TARBALL) + set(PRE_COMMIT_INSTALLED FALSE) + if(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) + if(EXISTS "${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit") + file(READ "${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit" FILE_CONTENTS) + string( + FIND "${FILE_CONTENTS}" + "File generated by pre-commit" + INDEX + ) + if(${INDEX} GREATER_EQUAL 0) + set(PRE_COMMIT_INSTALLED TRUE) + endif() + endif() + endif() + if(NOT ${PRE_COMMIT_INSTALLED}) + find_program(PRE_COMMIT_EXECUTABLE pre-commit) + if(PRE_COMMIT_EXECUTABLE) + message( + STATUS + "This module has pre-commit support. pre-commit binary was found. Installing pre-commit hook" + ) + execute_process( + COMMAND + "${PRE_COMMIT_EXECUTABLE}" install -f + ERROR_QUIET + RESULT_VARIABLE _precommitresult + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" + ) + if(_precommitresult EQUAL 0) + message(STATUS "Pre-commit installed.") + else() + message( + WARNING + "Error during installing pre-commit hook: ${PRE_COMMIT_EXECUTABLE} project source dir ${PROJECT_SOURCE_DIR}" + ) + include(KDEGitCommitHooks) + include(KDEClangFormat) + kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) + endif() + else() + message(WARNING "This module has pre-commit support. pre-commit binary was not found.") + include(KDEGitCommitHooks) + include(KDEClangFormat) + kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) endif() endif() -endif() -if(NOT ${PRE_COMMIT_INSTALLED}) - include(KDEGitCommitHooks) - include(KDEClangFormat) - kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) endif() include(ECMQtDeclareLoggingCategory) include(ECMDeprecationSettings) include(ECMFeatureSummary) -include(ECMAddQch) +include(ECMGenerateQDoc) set(KMBOX_LIB_VERSION ${PIM_VERSION}) -set(KMIME_LIB_VERSION "6.6.3") +set(KMIME_LIB_VERSION "6.7.0") -option( - BUILD_QCH - "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" - OFF -) -add_feature_info( - QCH - ${BUILD_QCH} - "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" -) ecm_setup_version(PROJECT VARIABLE_PREFIX KMBOX VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/src/kmbox_version.h" PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KPim6MboxConfigVersion.cmake" @@ -72,19 +99,30 @@ find_package(KPim6Mime ${KMIME_LIB_VERSION} CONFIG REQUIRED) add_definitions(-DQT_NO_CONTEXTLESS_CONNECT) -ecm_set_disabled_deprecation_versions(QT 6.10.0 KF 6.20.0) - -option( - USE_UNITY_CMAKE_SUPPORT - "Use UNITY cmake support (speedup compile time)" - OFF -) +ecm_set_disabled_deprecation_versions(QT 6.11.0 KF 6.23.0 KMIME 6.7.0) +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + # Not setting for GNU due to too many warnings related to private members of base classes or around lambdas + # see e.g. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56556 or https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79328 + string(APPEND CMAKE_CXX_FLAGS " -Wshadow") +endif() +option(USE_UNITY_CMAKE_SUPPORT "Use UNITY cmake support (speedup compile time)" OFF) set(COMPILE_WITH_UNITY_CMAKE_SUPPORT OFF) if(USE_UNITY_CMAKE_SUPPORT) set(COMPILE_WITH_UNITY_CMAKE_SUPPORT ON) endif() +option(WARNINGS_AS_ERRORS "Warnings are errors -Werror" OFF) +if(WARNINGS_AS_ERRORS) + if(MSVC) + add_compile_options(/WX) + add_compile_options(/wd4996) + else() + add_compile_options(-Werror) + add_compile_options(-Wno-error=deprecated-declarations) + endif() +endif() + ########### Targets ########### add_subdirectory(src) @@ -94,17 +132,6 @@ ########### CMake Config Files ########### set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KPim6Mbox") -if(BUILD_QCH) - ecm_install_qch_export( - TARGETS KPim6Mbox_QCH - FILE KPim6MBoxQchTargets.cmake - DESTINATION "${CMAKECONFIG_INSTALL_DIR}" - COMPONENT Devel - ) - set(PACKAGE_INCLUDE_QCHTARGETS - "include(\"\${CMAKE_CURRENT_LIST_DIR}/KPim6MBoxQchTargets.cmake\")" - ) -endif() configure_package_config_file( "${CMAKE_CURRENT_SOURCE_DIR}/KPimMboxConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/KPim6MboxConfig.cmake" @@ -119,22 +146,24 @@ COMPONENT Devel ) -install( - EXPORT KPim6MboxTargets - DESTINATION "${CMAKECONFIG_INSTALL_DIR}" - FILE KPim6MboxTargets.cmake - NAMESPACE KPim6:: -) +install(EXPORT KPim6MboxTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KPim6MboxTargets.cmake NAMESPACE KPim6::) install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/src/kmbox_version.h + FILES + ${CMAKE_CURRENT_BINARY_DIR}/src/kmbox_version.h DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KPim6/KMbox COMPONENT Devel ) -if(DEFINED kde_configure_git_pre_commit_hook) - kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT) +if(GIT_SOURCE_TARBALL) + if(DEFINED kde_configure_git_pre_commit_hook) + kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT) + endif() endif() ecm_feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) -file(GLOB_RECURSE ALL_SOURCE_FILES src/*.cpp src/*.h) +file( + GLOB_RECURSE ALL_SOURCE_FILES + src/*.cpp + src/*.h +) ecm_check_outbound_license(LICENSES GPL-2.0-only FILES ${ALL_SOURCE_FILES}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/CMakePresets.json new/kmbox-26.04.0/CMakePresets.json --- old/kmbox-25.12.3/CMakePresets.json 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/CMakePresets.json 2026-03-29 09:51:45.000000000 +0200 @@ -1,5 +1,6 @@ { - "version": 3, + "$schema": "https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json", + "version": 8, "configurePresets": [ { "name": "base", @@ -7,21 +8,26 @@ "generator": "Ninja", "binaryDir": "${sourceDir}/build-${presetName}", "installDir": "$env{KF6}", - "hidden": true, + "hidden": true + }, + { + "name": "generate-doc", + "displayName": "Build as debug + using mold linker + generate doc", "cacheVariables": { - "BUILD_QCH": "ON" - } + "DOC_DESTDIR": "$env{GENERATE_DOCDIR}" + }, + "inherits": [ + "dev-mold" + ] }, { "name": "dev-mold", "displayName": "Build as debug + using mold linker", "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug", - "CMAKE_EXPORT_COMPILE_COMMANDS": "ON", "CMAKE_SHARED_LINKER_FLAGS": "-fuse-ld=mold" }, "inherits": [ - "base" + "dev" ] }, { @@ -49,27 +55,22 @@ { "name": "dev-clang", "displayName": "dev-clang", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug", - "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" - }, "environment": { "CXX": "clang++", "CCACHE_DISABLE": "ON" }, "inherits": [ - "base" + "dev" ] }, { "name": "unity", "displayName": "Build with CMake unity support.", "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug", "USE_UNITY_CMAKE_SUPPORT": "ON" }, "inherits": [ - "base" + "dev" ] }, { @@ -123,8 +124,6 @@ "name": "ftime-trace", "displayName": "ftime-trace", "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug", - "USE_DEVELOPER_MODE": "ON", "CMAKE_C_FLAGS_INIT": "-ftime-trace", "CMAKE_CXX_FLAGS_INIT": "-ftime-trace" }, @@ -134,12 +133,20 @@ "CCACHE_DISABLE": "ON" }, "inherits": [ - "base" + "dev" ] } ], "buildPresets": [ { + "name": "generate-doc", + "configurePreset": "generate-doc", + "targets": [ + "prepare_docs", + "generate_docs" + ] + }, + { "name": "dev", "configurePreset": "dev" }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/CMakePresets.json.license new/kmbox-26.04.0/CMakePresets.json.license --- old/kmbox-25.12.3/CMakePresets.json.license 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/CMakePresets.json.license 2026-03-29 09:51:45.000000000 +0200 @@ -1,2 +1,2 @@ -# SPDX-FileCopyrightText: 2021-2025 Laurent Montel <[email protected]> +# SPDX-FileCopyrightText: 2021-2026 Laurent Montel <[email protected]> # SPDX-License-Identifier: BSD-3-Clause diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/ClangBuildAnalyzer.ini new/kmbox-26.04.0/ClangBuildAnalyzer.ini --- old/kmbox-25.12.3/ClangBuildAnalyzer.ini 1970-01-01 01:00:00.000000000 +0100 +++ new/kmbox-26.04.0/ClangBuildAnalyzer.ini 2026-03-29 09:51:45.000000000 +0200 @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: 2025-2026 Laurent Montel <[email protected]> +# SPDX-License-Identifier: CC0-1.0 +# ClangBuildAnalyzer reads ClangBuildAnalyzer.ini file from the working directory +# when invoked, and various aspects of reporting can be configured this way. + +# How many of most expensive things are reported? +[counts] + +# files that took most time to parse +fileParse = 20 +# files that took most time to generate code for +fileCodegen = 20 +# functions that took most time to generate code for +function = 50 +# header files that were most expensive to include +header = 10 +# for each expensive header, this many include paths to it are shown +headerChain = 10 +# templates that took longest to instantiate +template = 30 + + +# Minimum times (in ms) for things to be recorded into trace +[minTimes] + +# parse/codegen for a file +file = 10 + + +[misc] + +# Maximum length of symbol names printed; longer names will get truncated +maxNameLength = 100 + +# Only print "root" headers in expensive header report, i.e. +# only headers that are directly included by at least one source file +onlyRootHeaders = true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/KPimMboxConfig.cmake.in new/kmbox-26.04.0/KPimMboxConfig.cmake.in --- old/kmbox-25.12.3/KPimMboxConfig.cmake.in 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/KPimMboxConfig.cmake.in 2026-03-29 09:51:45.000000000 +0200 @@ -4,6 +4,8 @@ @PACKAGE_INIT@ include(CMakeFindDependencyMacro) -find_dependency(KPim6Mime "@KMIME_LIB_VERSION@") +find_dependency( + KPim6Mime + "@KMIME_LIB_VERSION@" +) include("${CMAKE_CURRENT_LIST_DIR}/KPim6MboxTargets.cmake") -@PACKAGE_INCLUDE_QCHTARGETS@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/README-pre-commit.md new/kmbox-26.04.0/README-pre-commit.md --- old/kmbox-25.12.3/README-pre-commit.md 1970-01-01 01:00:00.000000000 +0100 +++ new/kmbox-26.04.0/README-pre-commit.md 2026-03-29 09:51:45.000000000 +0200 @@ -0,0 +1,14 @@ +# Install + +## opensuse + +zypper in python313-pre-commit + +## Usage + +We need to overwrite pre-commit config file: +pre-commit install -f + +For executing for all file: + +pre-commit run --all diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/README-pre-commit.md.license new/kmbox-26.04.0/README-pre-commit.md.license --- old/kmbox-25.12.3/README-pre-commit.md.license 1970-01-01 01:00:00.000000000 +0100 +++ new/kmbox-26.04.0/README-pre-commit.md.license 2026-03-29 09:51:45.000000000 +0200 @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2023-2026 Laurent Montel <[email protected]> +SPDX-License-Identifier: BSD-3-Clause diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/README-qdoc.md new/kmbox-26.04.0/README-qdoc.md --- old/kmbox-25.12.3/README-qdoc.md 1970-01-01 01:00:00.000000000 +0100 +++ new/kmbox-26.04.0/README-qdoc.md 2026-03-29 09:51:45.000000000 +0200 @@ -0,0 +1,40 @@ +# Generate doc + +## Dependencies + +We need to clone kde-qdoc-common + +```bash +cd <kde path> +git clone https://invent.kde.org/sdk/kde-qdoc-common +``` + +## Environment variables + +set in `.bashrc` + +```bash +export KDE_DOCS=<kde path>/kde-qdoc-common +``` + +We need to define where we generate doc: + +```bash +export GENERATE_DOCDIR=<kde path>/generate-docs +``` + +## CMakePreset.json + +For generating doc we have a target in CMakePreset.json + +```bash +cmake --preset generate-doc + +cmake --build --preset generate-doc +``` + +we can show result in `$GENERATE_DOCDIR/` + +## Porting info + +[Streamlined Application Development Experience #10](https://invent.kde.org/teams/goals/streamlined-application-development-experience/-/issues/10) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/README-qdoc.md.license new/kmbox-26.04.0/README-qdoc.md.license --- old/kmbox-25.12.3/README-qdoc.md.license 1970-01-01 01:00:00.000000000 +0100 +++ new/kmbox-26.04.0/README-qdoc.md.license 2026-03-29 09:51:45.000000000 +0200 @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2023-2026 Laurent Montel <[email protected]> +SPDX-License-Identifier: BSD-3-Clause diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/REUSE.toml new/kmbox-26.04.0/REUSE.toml --- old/kmbox-25.12.3/REUSE.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/kmbox-26.04.0/REUSE.toml 2026-03-29 09:51:45.000000000 +0200 @@ -0,0 +1,18 @@ +version = 1 +SPDX-FileCopyrightText = "none" +SPDX-License-Identifier = "CC0-1.0" +SPDX-PackageName = "kmbox" +SPDX-PackageSupplier = "Montel Laurent <[email protected]>" +SPDX-PackageDownloadLocation = "https://invent.kde.org/pim/kmbox" + +[[annotations]] +path = ["src/kmbox-index.qdoc", "src/kmbox.qdoc", "src/kmbox.qdocconf"] +precedence = "aggregate" +SPDX-FileCopyrightText = "none" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = [".gersemirc"] +precedence = "aggregate" +SPDX-FileCopyrightText = "Allen Winter <[email protected]>" +SPDX-License-Identifier = "CC0-1.0" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/autotests/mboxbenchmark.cpp new/kmbox-26.04.0/autotests/mboxbenchmark.cpp --- old/kmbox-25.12.3/autotests/mboxbenchmark.cpp 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/autotests/mboxbenchmark.cpp 2026-03-29 09:51:45.000000000 +0200 @@ -28,7 +28,7 @@ void MBoxBenchmark::initTestCase() { mTempDir = new QTemporaryDir(QDir::tempPath() + QLatin1Char('/') + QLatin1StringView(testDir)); - mMail1 = KMime::Message::Ptr(new KMime::Message); + mMail1 = std::make_shared<KMime::Message>(); mMail1->setContent(KMime::CRLFtoLF(sEntry1)); mMail1->parse(); } @@ -59,14 +59,13 @@ const auto lst = mbox2.entries(); for (const MBoxEntry &entry : lst) { auto mail = mbox2.readMessage(entry); - delete mail; } } } void MBoxBenchmark::testProcfileLockPerformance() { - mMail1 = KMime::Message::Ptr(new KMime::Message); + mMail1 = std::make_shared<KMime::Message>(); mMail1->setContent(KMime::CRLFtoLF(sEntry1)); mMail1->parse(); @@ -88,37 +87,8 @@ const auto lst = mbox2.entries(); for (const MBoxEntry &entry : lst) { auto mail = mbox2.readMessage(entry); - delete mail; } } } -void MBoxBenchmark::voidTestMD5Performance() -{ - MBox mbox; - mbox.setLockType(MBox::None); - mbox.load(fileName()); - - for (int i = 0; i < 1000; ++i) { - mbox.appendMessage(mMail1); - } - - mbox.save(fileName()); - - QBENCHMARK { - QFile file(fileName()); - QVERIFY(file.exists()); - QVERIFY(file.open(QIODevice::ReadOnly)); - - QCryptographicHash hash(QCryptographicHash::Md5); - qint64 blockSize = 512 * 1024; // Read blocks of 512K - - while (!file.atEnd()) { - hash.addData(file.read(blockSize)); - } - - file.close(); - } -} - #include "moc_mboxbenchmark.cpp" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/autotests/mboxbenchmark.h new/kmbox-26.04.0/autotests/mboxbenchmark.h --- old/kmbox-25.12.3/autotests/mboxbenchmark.h 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/autotests/mboxbenchmark.h 2026-03-29 09:51:45.000000000 +0200 @@ -20,12 +20,11 @@ void cleanupTestCase(); void testNoLockPerformance(); void testProcfileLockPerformance(); - void voidTestMD5Performance(); private: QString fileName(); private: QTemporaryDir *mTempDir = nullptr; - KMime::Message::Ptr mMail1; + std::shared_ptr<KMime::Message> mMail1; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/autotests/mboxtest.cpp new/kmbox-26.04.0/autotests/mboxtest.cpp --- old/kmbox-25.12.3/autotests/mboxtest.cpp 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/autotests/mboxtest.cpp 2026-03-29 09:51:45.000000000 +0200 @@ -52,11 +52,11 @@ mboxfile.close(); QVERIFY(mboxfile.exists()); - mMail1 = KMime::Message::Ptr(new KMime::Message); + mMail1 = std::make_shared<KMime::Message>(); mMail1->setContent(KMime::CRLFtoLF(sEntry1)); mMail1->parse(); - mMail2 = KMime::Message::Ptr(new KMime::Message); + mMail2 = std::make_shared<KMime::Message>(); mMail2->setContent(KMime::CRLFtoLF(sEntry2)); mMail2->parse(); } @@ -188,7 +188,7 @@ const QByteArray header = mbox.readMessageHeaders(msgInfo); QVERIFY(!header.isEmpty()); - KMime::Message *message = mbox.readMessage(msgInfo); + auto message = mbox.readMessage(msgInfo); QVERIFY(message != nullptr); auto headers = new KMime::Message(); @@ -212,7 +212,6 @@ QCOMPARE(message->from()->as7BitString(), mMail2->from()->as7BitString()); } - delete message; delete headers; } } @@ -269,7 +268,7 @@ for (int i = 0; i < 5; ++i) { removeTestFile(); - KMime::Message::Ptr mail = KMime::Message::Ptr(new KMime::Message); + std::shared_ptr<KMime::Message> mail(new KMime::Message); mail->setContent(KMime::CRLFtoLF(sEntry1 + QByteArray(i, '\n'))); mail->parse(); @@ -424,7 +423,7 @@ const QByteArray header = mbox.readMessageHeaders(msgInfo); QVERIFY(!header.isEmpty()); - KMime::Message *message = mbox.readMessage(msgInfo); + auto message = mbox.readMessage(msgInfo); QVERIFY(message != nullptr); auto headers = new KMime::Message(); @@ -436,7 +435,6 @@ QCOMPARE(message->to()->as7BitString(), headers->to()->as7BitString()); QCOMPARE(message->from()->as7BitString(), headers->from()->as7BitString()); - delete message; delete headers; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/autotests/mboxtest.h new/kmbox-26.04.0/autotests/mboxtest.h --- old/kmbox-25.12.3/autotests/mboxtest.h 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/autotests/mboxtest.h 2026-03-29 09:51:45.000000000 +0200 @@ -39,8 +39,8 @@ private: QTemporaryDir *mTempDir = nullptr; - KMime::Message::Ptr mMail1; - KMime::Message::Ptr mMail2; + std::shared_ptr<KMime::Message> mMail1; + std::shared_ptr<KMime::Message> mMail2; }; class ThreadFillsMBox : public QThread diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/readme-build-ftime.txt new/kmbox-26.04.0/readme-build-ftime.txt --- old/kmbox-25.12.3/readme-build-ftime.txt 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/readme-build-ftime.txt 2026-03-29 09:51:45.000000000 +0200 @@ -12,7 +12,7 @@ ## Command line -cmake -preset ftime-trace +cmake --preset ftime-trace ClangBuildAnalyzer --start $PWD/build-ftime-trace cmake --build --preset ftime-trace diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/sanitizers.supp new/kmbox-26.04.0/sanitizers.supp --- old/kmbox-25.12.3/sanitizers.supp 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/sanitizers.supp 2026-03-29 09:51:45.000000000 +0200 @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021-2025 Laurent Montel <[email protected]> +# SPDX-FileCopyrightText: 2021-2026 Laurent Montel <[email protected]> # SPDX-License-Identifier: CC0-1.0 # Suppression file for ASAN/LSAN diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/src/CMakeLists.txt new/kmbox-26.04.0/src/CMakeLists.txt --- old/kmbox-25.12.3/src/CMakeLists.txt 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/src/CMakeLists.txt 2026-03-29 09:51:45.000000000 +0200 @@ -22,7 +22,12 @@ ) if(COMPILE_WITH_UNITY_CMAKE_SUPPORT) - set_target_properties(KPim6Mbox PROPERTIES UNITY_BUILD ON) + set_target_properties( + KPim6Mbox + PROPERTIES + UNITY_BUILD + ON + ) endif() ecm_generate_export_header(KPim6Mbox @@ -31,30 +36,23 @@ DEPRECATED_BASE_VERSION 0 USE_VERSION_HEADER ) -target_include_directories( - KPim6Mbox - INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/KPim6/KMbox>" -) -target_include_directories( - KPim6Mbox - PUBLIC "$<BUILD_INTERFACE:${KMbox_SOURCE_DIR}/src;${KMbox_BINARY_DIR}/src>" -) +target_include_directories(KPim6Mbox INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/KPim6/KMbox>") +target_include_directories(KPim6Mbox PUBLIC "$<BUILD_INTERFACE:${KMbox_SOURCE_DIR}/src;${KMbox_BINARY_DIR}/src>") target_link_libraries(KPim6Mbox PUBLIC KPim6::Mime) set_target_properties( KPim6Mbox PROPERTIES - VERSION ${KMBOX_VERSION} - SOVERSION ${KMBOX_SOVERSION} - EXPORT_NAME Mbox + VERSION + ${KMBOX_VERSION} + SOVERSION + ${KMBOX_SOVERSION} + EXPORT_NAME + Mbox ) -install( - TARGETS KPim6Mbox - EXPORT KPim6MboxTargets - ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} -) +install(TARGETS KPim6Mbox EXPORT KPim6MboxTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) ########### Generate Headers ############### ecm_generate_headers(KMbox_CamelCase_HEADERS @@ -65,39 +63,15 @@ REQUIRED_HEADERS KMbox_HEADERS ) -install( - FILES ${KMbox_CamelCase_HEADERS} - DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KPim6/KMbox/KMbox/ - COMPONENT Devel -) +install(FILES ${KMbox_CamelCase_HEADERS} DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KPim6/KMbox/KMbox/ COMPONENT Devel) install( - FILES ${KMbox_BINARY_DIR}/src/kmbox_export.h ${KMbox_HEADERS} + FILES + ${KMbox_BINARY_DIR}/src/kmbox_export.h + ${KMbox_HEADERS} DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KPim6/KMbox/kmbox COMPONENT Devel ) ecm_qt_install_logging_categories(EXPORT KMBOX FILE kmbox.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}) - -if(BUILD_QCH) - ecm_add_qch( - KPim6Mbox_QCH - NAME KMbox - BASE_NAME KPim6Mbox - VERSION ${PIM_VERSION} - ORG_DOMAIN org.kde - SOURCES # using only public headers, to cover only public API - ${KMbox_HEADERS} - MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md" - #IMAGE_DIRS "${CMAKE_SOURCE_DIR}/docs/pics" - LINK_QCHS - Qt6Core_QCH - INCLUDE_DIRS - ${CMAKE_CURRENT_BINARY_DIR} - BLANK_MACROS - KMBOX_EXPORT - TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} - QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} - COMPONENT Devel - ) -endif() +ecm_generate_qdoc(KPim6Mbox kmbox.qdocconf) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/src/kmbox-index.qdoc new/kmbox-26.04.0/src/kmbox-index.qdoc --- old/kmbox-25.12.3/src/kmbox-index.qdoc 1970-01-01 01:00:00.000000000 +0100 +++ new/kmbox-26.04.0/src/kmbox-index.qdoc 2026-03-29 09:51:45.000000000 +0200 @@ -0,0 +1,21 @@ +/*! + \page kmbox-index.html + \title KMBox + + KMBox provides API to access emails in storages in + the MBox format + + \section1 Using the Module + + \include {module-use.qdocinc} {using the c++ api} + + \section2 Building with CMake + + \include {module-use.qdocinc} {building with cmake} {KPim6} {Mbox} {KPim6::Mbox} + + \section1 API Reference + + \list + \li \l{KMBox C++ Classes} + \endlist +*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/src/kmbox.qdoc new/kmbox-26.04.0/src/kmbox.qdoc --- old/kmbox-25.12.3/src/kmbox.qdoc 1970-01-01 01:00:00.000000000 +0100 +++ new/kmbox-26.04.0/src/kmbox.qdoc 2026-03-29 09:51:45.000000000 +0200 @@ -0,0 +1,9 @@ +/*! + \module KMBox + \title KMBox C++ Classes + \ingroup modules + \cmakepackage KPim6 + \cmakecomponent Mbox + + \brief KMBox provides API to access emails in storages in the MBox format. +*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/src/kmbox.qdocconf new/kmbox-26.04.0/src/kmbox.qdocconf --- old/kmbox-25.12.3/src/kmbox.qdocconf 1970-01-01 01:00:00.000000000 +0100 +++ new/kmbox-26.04.0/src/kmbox.qdocconf 2026-03-29 09:51:45.000000000 +0200 @@ -0,0 +1,33 @@ +include($KDE_DOCS/global/qt-module-defaults.qdocconf) + +project = KMBox +description = KMBox provides API to access emails in storages in the MBox format. + + +documentationinheaders = true + +headerdirs += . +sourcedirs += . + +outputformats = HTML + +depends += \ + qtcore + +navigation.landingpage = "KMBox" + +qhp.projects = kmbox + +qhp.kmbox.file = kmbox.qhp +qhp.kmbox.namespace = org.kde.kmbox.$QT_VERSION_TAG +qhp.kmbox.virtualFolder = kmbox +qhp.kmbox.indexTitle = kmbox +qhp.kmbox.indexRoot = + +qhp.kmbox.subprojects = classes +qhp.kmbox.subprojects.classes.title = C++ Classes +qhp.kmbox.subprojects.classes.indexTitle = KMBox C++ Classes +qhp.kmbox.subprojects.classes.selectors = class fake:headerfile +qhp.kmbox.subprojects.classes.sortPages = true + +tagfile = kmbox.tags diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/src/mbox.cpp new/kmbox-26.04.0/src/mbox.cpp --- old/kmbox-25.12.3/src/mbox.cpp 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/src/mbox.cpp 2026-03-29 09:51:45.000000000 +0200 @@ -48,7 +48,7 @@ // d->mInitialMboxFileSize is set to the file size at that moment. New entries // are stored in memory (d->mAppendedEntries). The initial file size and the size // of the buffer determine the offset for the next message to append. -MBoxEntry MBox::appendMessage(const KMime::Message::Ptr &entry) +MBoxEntry MBox::appendMessage(const std::shared_ptr<KMime::Message> &entry) { // It doesn't make sense to add entries when we don't have an reference file. Q_ASSERT(!d->mMboxFile.fileName().isEmpty()); @@ -482,14 +482,14 @@ return message; } -KMime::Message *MBox::readMessage(const MBoxEntry &entry) +std::unique_ptr<KMime::Message> MBox::readMessage(const MBoxEntry &entry) { const QByteArray message = readRawMessage(entry); if (message.isEmpty()) { return nullptr; } - auto mail = new KMime::Message(); + auto mail = std::make_unique<KMime::Message>(); mail->setContent(KMime::CRLFtoLF(message)); mail->parse(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/src/mbox.h new/kmbox-26.04.0/src/mbox.h --- old/kmbox-25.12.3/src/mbox.h 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/src/mbox.h 2026-03-29 09:51:45.000000000 +0200 @@ -16,17 +16,24 @@ { class MBoxPrivate; -/** - * @short A class to access mail storages in MBox format. +/*! + * \class KMBox::MBox + * \inmodule KMBox + * \inheaderfile KMbox/MBox + * \brief A class to access mail storages in MBox format. * - * @author Bertjan Broeksema <[email protected]> - * @since 4.6 + * \since 4.6 */ class KMBOX_EXPORT MBox { public: - /** + /*! * Describes the type of locking that will be used. + * + * \value ProcmailLockfile + * \value MuttDotlock + * \value MuttDotlockPrivileged + * \value None */ enum LockType { ProcmailLockfile, @@ -35,188 +42,219 @@ None }; - /** + /*! * Creates a new mbox object. */ MBox(); - /** + /*! * Destroys the mbox object. * * The file will be unlocked if it is still open. */ ~MBox(); - /** - * Appends @p message to the MBox and returns the corresponding mbox entry for it. + /*! + * Appends \a message to the MBox and returns the corresponding mbox entry for it. + * * You must load a mbox file by making a call to load( const QString& ) before * appending entries. - * The returned mbox entry is <em>only</em> valid for that particular file. + * The returned mbox entry is only valid for that particular file. * - * @param message The message to append to the mbox. - * @return the corresponding mbox entry for the message in the file or an invalid mbox entry + * \a message The message to append to the mbox. + * + * Returns the corresponding mbox entry for the message in the file or an invalid mbox entry * if the message was not added. */ - [[nodiscard]] MBoxEntry appendMessage(const KMime::Message::Ptr &message); + [[nodiscard]] MBoxEntry appendMessage(const std::shared_ptr<KMime::Message> &message); - /** + /*! * Retrieve the mbox entry objects for all emails from the file except the - * @p deleteEntries. - * The @p deletedEntries should be a list of mbox entries with offsets of deleted messages. - * @param deletedEntries list of mbox entries that have been deleted and need not be retrieved - * Note: One <em>must</em> call load() before calling this method. + * \a deletedEntries. + * + * The \a deletedEntries should be a list of mbox entries with offsets of deleted messages. + * + * \a deletedEntries list of mbox entries that have been deleted and need not be retrieved + * + * \note One must call load() before calling this method. */ [[nodiscard]] MBoxEntry::List entries(const MBoxEntry::List &deletedEntries = MBoxEntry::List()) const; - /** + /*! * Returns the file name that was passed to the last call to load(). */ [[nodiscard]] QString fileName() const; - /** - * Loads the raw mbox data from disk into the current MBox object. Messages - * already present are <em>not</em> preserved. This method does not load the + /*! + * Loads the raw mbox data from disk into the current MBox object. + * + * Messages already present are not preserved. This method does not load the * full messages into memory but only the offsets of the messages and their * sizes. If the file currently is locked this method will do nothing and * return false. Appended messages that are not written yet will get lost. * - * @param fileName the name of the mbox on disk. - * @return true, if successful, false on error. + * \a fileName the name of the mbox on disk. * - * @see save( const QString & ) + * Returns \c true, if successful, \c false on error. + * + * \sa save() */ [[nodiscard]] bool load(const QString &fileName); - /** - * Locks the mbox file using the configured lock method. This can be used + /*! + * Locks the mbox file using the configured lock method. + * + * This can be used * for consecutive calls to readMessage and readMessageHeaders. Calling lock() * before these calls prevents the mbox file being locked for every call. * - * NOTE: Even when the lock method is None the mbox is internally marked as + * \note Even when the lock method is None the mbox is internally marked as * locked. This means that it must be unlocked before calling load(). * - * @return true if locked successful, false on error. + * Returns \c true if locked successful, \c false on error. * - * @see setLockType( LockType ), unlock() + * \sa setLockType(), unlock() */ [[nodiscard]] bool lock(); - /** + /*! * Returns whether or not the mbox currently is locked. */ [[nodiscard]] bool locked() const; - /** + /*! * Removes all messages for the given mbox entries from the current reference file - * (the file that is loaded with load( const QString & ). + * (the file that is loaded with load(). + * * This method will first check if all lines at the offsets are actually * separator lines if this is not then no message will be deleted to prevent * corruption. * - * @param deletedEntries The mbox entries of the messages that should be removed from + * \a deletedEntries The mbox entries of the messages that should be removed from * the file. - * @param movedEntries Optional list for storing pairs of mbox entries that got moved + * + * \a movedEntries Optional list for storing pairs of mbox entries that got moved * within the file due to the deletions. - * The @c first member of the pair is the entry with the original offsets - * the @c second member is the entry with the new (current) offset + * The first member of the pair is the entry with the original offsets + * the second member is the entry with the new (current) offset * - * @return true if all offsets refer to a mbox separator line and a file was - * loaded, false otherwise. If the latter, the physical file has + * Returns \c true if all offsets refer to a mbox separator line and a file was + * loaded, \c false otherwise. If the latter, the physical file has * not changed. */ [[nodiscard]] bool purge(const MBoxEntry::List &deletedEntries, QList<MBoxEntry::Pair> *movedEntries = nullptr); - /** - * Reads the entire message from the file for the given mbox @p entry. If the - * mbox file is not locked this method will lock the file before reading and + /*! + * Reads the entire message from the file for the given mbox \a entry. + * + * If the mbox file is not locked this method will lock the file before reading and * unlock it after reading. If the file already is locked, it will not * unlock the file after reading the entry. * - * @param entry The entry in the mbox file. - * @return Message for the given entry or 0 if the file could not be locked + * \a entry The entry in the mbox file. + * + * Returns the message for the given entry or 0 if the file could not be locked * or the entry offset > fileSize. * - * @see lock(), unlock() + * \sa lock(), unlock() */ - KMime::Message *readMessage(const MBoxEntry &entry); + std::unique_ptr<KMime::Message> readMessage(const MBoxEntry &entry); - /** - * Reads the headers of the message for the given mbox @p entry. If the + /*! + * Reads the headers of the message for the given mbox \a entry. + * + * If the * mbox file is not locked this method will lock the file before reading and * unlock it after reading. If the file already is locked, it will not * unlock the file after reading the entry. * - * @param entry The entry in the mbox file. - * @return QByteArray containing the raw message header data. + * \a entry The entry in the mbox file. + * + * Returns QByteArray containing the raw message header data. * - * @see lock(), unlock() + * \sa lock(), unlock() */ [[nodiscard]] QByteArray readMessageHeaders(const MBoxEntry &entry); - /** - * Reads the entire message from the file for the given mbox @p entry. If the + /*! + * Reads the entire message from the file for the given mbox \a entry. + * + * If the * mbox file is not locked this method will lock the file before reading and * unlock it after reading. If the file already is locked, it will not * unlock the file after reading the entry. * - * @param entry The entry in the mbox file. - * @return QByteArray containing the raw message data. + * \a entry The entry in the mbox file. + * + * Returns QByteArray containing the raw message data. * - * @see lock(), unlock() + * \sa lock(), unlock() */ [[nodiscard]] QByteArray readRawMessage(const MBoxEntry &entry); - /** + /*! * Writes the mbox to disk. If the fileName is empty only appended messages * will be written to the file that was passed to load( const QString & ). * Otherwise the contents of the file that was loaded with load is copied to - * @p fileName first. + * \a fileName first. * - * @param fileName the name of the file - * @return true if the save was successful; false otherwise. + * \a fileName the name of the file * - * @see load( const QString & ) + * Returns \c true if the save was successful; \c false otherwise. + * + * \sa load() */ [[nodiscard]] bool save(const QString &fileName = QString()); - /** - * Sets the locktype that should be used for locking the mbox file. If the + /*! + * Sets the locktype that should be used for locking the mbox file. + * + * If the * new LockType cannot be used (e.g. the lockfile executable could not be * found) the LockType will not be changed. - * @param ltype the locktype to set + * + * \a ltype the locktype to set + * * This method will not do anything if the mbox object is currently locked * to make sure that it doesn't leave a locked file for one of the lockfile - * / mutt_dotlock methods. + * methods. */ [[nodiscard]] bool setLockType(LockType ltype); - /** + /*! * Sets the lockfile that should be used by the procmail or the KDE lock - * file method. If this method is not called and one of the before mentioned + * file method. + * + * If this method is not called and one of the before mentioned * lock methods is used the name of the lock file will be equal to * MBOXFILENAME.lock. - * @param lockFile the lockfile to set + * + * \a lockFile the lockfile to set */ void setLockFile(const QString &lockFile); - /** - * By default the unlock method will directly unlock the file. However this + /*! + * By default the unlock method will directly unlock the file. + * + * However this * is expensive in case of many consecutive calls to readEntry. Setting the * time out to a non zero value will keep the lock open until the timeout has * passed. On each read the timer will be reset. - * @param msec the time out to set for file lock + * + * \a msec the time out to set for file lock */ void setUnlockTimeout(int msec); - /** + /*! * Unlock the mbox file. * - * @return true if the unlock was successful, false otherwise. + * Returns \c true if the unlock was successful, \c false otherwise. * - * @see lock() + * \sa lock() */ [[nodiscard]] bool unlock(); - /** + + /*! * Set the access mode of the mbox file to read only. * * If this is set to true, the mbox file can only be read from disk. @@ -225,28 +263,27 @@ * You can still append messages, which are stored in memory * until save() is called, but the mbox can not be saved/purged to itself. * However it is possible to save it to a different file. - * @param ro the readOnly flag to use * - * @see save( const QString & ) + * \a ro the readOnly flag to use + * + * \sa save() * - * @since 4.14.5 + * \since 4.14.5 */ void setReadOnly(bool ro = true); - /** + /*! * Returns if the current access mode is set to readOnly. * * The access mode can either be set explicitly with setReadOnly() or * implicitly by calling load() on a readOnly file. * - * @since 4.14.5 + * \since 4.14.5 */ [[nodiscard]] bool isReadOnly() const; private: - //@cond PRIVATE Q_DISABLE_COPY(MBox) std::unique_ptr<class MBoxPrivate> const d; - //@endcond }; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/src/mbox_p.cpp new/kmbox-26.04.0/src/mbox_p.cpp --- old/kmbox-25.12.3/src/mbox_p.cpp 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/src/mbox_p.cpp 2026-03-29 09:51:45.000000000 +0200 @@ -93,7 +93,7 @@ QByteArray separator = "From "; - KMime::Headers::From *from = mail.from(false); + KMime::Headers::From *from = mail.from(KMime::DontCreate); if (!from || from->addresses().isEmpty()) { separator += "[email protected]"; } else { @@ -101,7 +101,7 @@ } // format dateTime according to the mbox "standard" RFC4155 - KMime::Headers::Date *date = mail.date(false); + KMime::Headers::Date *date = mail.date(KMime::DontCreate); QDateTime dateTime; if (!date || date->isEmpty()) { dateTime = QDateTime::currentDateTimeUtc(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/src/mbox_p.h new/kmbox-26.04.0/src/mbox_p.h --- old/kmbox-25.12.3/src/mbox_p.h 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/src/mbox_p.h 2026-03-29 09:51:45.000000000 +0200 @@ -20,7 +20,7 @@ Q_OBJECT public: - MBoxPrivate(MBox *mbox); + explicit MBoxPrivate(MBox *mbox); ~MBoxPrivate() override; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kmbox-25.12.3/src/mboxentry.h new/kmbox-26.04.0/src/mboxentry.h --- old/kmbox-25.12.3/src/mboxentry.h 2026-02-13 08:17:39.000000000 +0100 +++ new/kmbox-26.04.0/src/mboxentry.h 2026-03-29 09:51:45.000000000 +0200 @@ -12,94 +12,102 @@ #include <QPair> #include <QSharedDataPointer> +/*! + * \namespace KMBox + * \inmodule KMBox + */ namespace KMBox { class MBoxEntryPrivate; -/** - * @short A class that encapsulates an entry of a MBox. +/*! + * \class KMBox::MBoxEntry + * \inmodule KMBox + * \inheaderfile KMbox/MBoxEntry + * \brief A class that encapsulates an entry of a MBox. * - * @author Tobias Koenig <[email protected]> - * @since 4.6 + * \since 4.6 */ class KMBOX_EXPORT MBoxEntry { public: - /** + /*! + * \typealias KMBox::MBoxEntry::List + * * Describes a list of mbox entry objects. */ using List = QList<MBoxEntry>; - /** + /*! + * \typealias KMBox::MBoxEntry::Pair + * * Describes a pair of mbox entry objects. */ using Pair = QPair<MBoxEntry, MBoxEntry>; - /** + /*! * Creates an invalid mbox entry object. */ MBoxEntry(); - /** + /*! * Creates an mbox entry object. * - * @param offset The offset of the message the object references. + * \a offset The offset of the message the object references. */ explicit MBoxEntry(quint64 offset); - /** - * Creates an mbox entry object from an @p other object. + /*! + * Creates an mbox entry object from an \a other object. */ MBoxEntry(const MBoxEntry &other); - /** + /*! * Destroys the mbox entry object. */ ~MBoxEntry(); - /** - * Replaces this mbox entry object with an @p other object. + /*! + * Replaces this mbox entry object with an \a other object. */ MBoxEntry &operator=(const MBoxEntry &other); - /** - * Returns whether this mbox entry object is equal to an @p other. + /*! + * Returns whether this mbox entry object is equal to an \a other. */ bool operator==(const MBoxEntry &other) const; - /** - * Returns whether this mbox entry object is not equal to an @p other. + /*! + * Returns whether this mbox entry object is not equal to an \a other. */ bool operator!=(const MBoxEntry &other) const; - /** + /*! * Returns whether this is a valid mbox entry object. */ [[nodiscard]] bool isValid() const; - /** + /*! * Returns the offset of the message that is referenced by this * mbox entry object. */ [[nodiscard]] quint64 messageOffset() const; - /** + /*! * Returns the size of the message that is referenced by this * mbox entry object. */ [[nodiscard]] quint64 messageSize() const; - /** + /*! * Returns the separator size of the message that is referenced by this * mbox entry object. */ [[nodiscard]] quint64 separatorSize() const; private: - //@cond PRIVATE friend class MBox; QSharedDataPointer<MBoxEntryPrivate> d; - //@endcond }; }
