Git commit ba97f08c5f6bd63601eafd27f79ce301aa8a021f by Laurent Montel. Committed on 11/06/2025 at 18:32. Pushed by mlaurent into branch 'master'.
Add pre-commit support A +95 -0 .clang-format-pre-commit M +1 -4 .gitlab-ci.yml A +59 -0 .pre-commit-config.yaml M +79 -34 CMakeLists.txt M +1 -1 LICENSES/GPL-2.0-or-later.txt A +19 -0 LICENSES/MIT.txt M +1 -1 TODO M +22 -15 console/CMakeLists.txt M +12 -8 console/autotests/CMakeLists.txt M +102 -106 core/CMakeLists.txt M +1 -1 core/akregator/exportakregatorjobinterface.cpp M +41 -8 core/autotests/CMakeLists.txt M +42 -10 core/autotests/addressbook/CMakeLists.txt M +42 -11 core/autotests/akregator/CMakeLists.txt M +26 -7 core/autotests/alarm/CMakeLists.txt M +42 -11 core/autotests/calendar/CMakeLists.txt M +72 -19 core/autotests/mail/CMakeLists.txt M +1 -1 core/mail/exportmailfolderattributejobimpl.cpp M +0 -1 doc/CMakeLists.txt M +1 -1 doc/index.docbook M +67 -67 gui/CMakeLists.txt M +76 -17 gui/autotests/CMakeLists.txt M +2 -2 gui/backup-structure.txt M +0 -1 gui/pimdataexporter.rc M +19 -5 gui/tests/CMakeLists.txt M +0 -1 readme-build-ftime.txt https://invent.kde.org/pim/pim-data-exporter/-/commit/ba97f08c5f6bd63601eafd27f79ce301aa8a021f diff --git a/.clang-format-pre-commit b/.clang-format-pre-commit new file mode 100644 index 00000000..9b5ae0af --- /dev/null +++ b/.clang-format-pre-commit @@ -0,0 +1,95 @@ +--- +# SPDX-FileCopyrightText: 2019 Christoph Cullmann <[email protected]> +# SPDX-FileCopyrightText: 2019 Gernot Gebhard <[email protected]> +# +# SPDX-License-Identifier: MIT + +# This file got automatically created by ECM, do not edit +# See https://clang.llvm.org/docs/ClangFormatStyleOptions.html for the config options +# and https://community.kde.org/Policies/Frameworks_Coding_Style#Clang-format_automatic_code_formatting +# for clang-format tips & tricks +--- +Language: JavaScript +DisableFormat: true +--- +Language: Json +DisableFormat: false +IndentWidth: 4 +--- + +# 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 + +# no single line enums +AllowShortEnumsOnASingleLine: false + +# 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 with 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 + +# Always break after template declaration +AlwaysBreakTemplateDeclarations: true + +# macros for which the opening brace stays attached. +ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE , wl_resource_for_each, wl_resource_for_each_safe ] + +# 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 --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 815c3cb5..fd4012f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,11 +6,8 @@ include: file: - /gitlab-templates/linux-qt6.yml - /gitlab-templates/linux-qt6-next.yml - - /gitlab-templates/json-validation.yml - /gitlab-templates/freebsd-qt6.yml - /gitlab-templates/reuse-lint.yml - /gitlab-templates/cppcheck.yml - - /gitlab-templates/clang-format.yml - /gitlab-templates/windows-qt6.yml - - /gitlab-templates/xml-lint.yml - - /gitlab-templates/yaml-lint.yml + - /gitlab-templates/pre-commit.yml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..80cff5eb --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: none +# SPDX-License-Identifier: CC0-1.0 +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks + +exclude: (^po/|.desktop|Messages.sh) +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-added-large-files + - id: check-case-conflict + - id: check-xml + - id: check-yaml + args: [--allow-multiple-documents] + exclude: ^(.clang-tidy) + - id: check-json + - id: check-symlinks + - id: destroyed-symlinks + - id: check-executables-have-shebangs + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v20.1.4 + hooks: + - id: clang-format + # force using this project's configuration rather + # than the one provided by CI + args: ["--style=file:.clang-format-pre-commit"] + - repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.11.9 + hooks: + # Run the linter. + - id: ruff + # Run the formatter. + - id: ruff-format + - repo: https://github.com/codespell-project/codespell + rev: v2.4.1 + hooks: + - 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 + hooks: + - id: gersemi + - repo: https://github.com/DavidAnson/markdownlint-cli2 + rev: v0.18.1 + hooks: + - id: markdownlint-cli2 + files: \.(md|mdown|markdown)$ + - repo: https://github.com/scop/pre-commit-shfmt + rev: v3.11.0-1 + hooks: + - id: shfmt + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.10.0.1 + hooks: + - id: shellcheck diff --git a/CMakeLists.txt b/CMakeLists.txt index 84af99f5..2cf319a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,6 @@ find_package(ECM ${KF_MIN_VERSION} CONFIG REQUIRED) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) include(ECMInstallIcons) - include(ECMSetupVersion) include(ECMAddTests) @@ -28,25 +27,40 @@ include(ECMAddAppIcon) include(ECMQtDeclareLoggingCategory) include(ECMDeprecationSettings) include(ECMFeatureSummary) -include(KDEGitCommitHooks) -include(KDEClangFormat) -file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES -gui/*.cpp -gui/*.h -core/*.cpp -core/*.h -console/*.cpp -console/*.h +file( + GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES + gui/*.cpp + gui/*.h + core/*.cpp + core/*.h + console/*.cpp + console/*.h ) -kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) + +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}) + include(KDEGitCommitHooks) + include(KDEClangFormat) + kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) +endif() include(ECMCheckOutboundLicense) -file(GLOB_RECURSE ALL_SOURCE_FILES -gui/*.cpp -gui/*.h -core/*.cpp -core/*.h -console/*.cpp -console/*.h +file( + GLOB_RECURSE ALL_SOURCE_FILES + gui/*.cpp + gui/*.h + core/*.cpp + core/*.h + console/*.cpp + console/*.h ) ecm_check_outbound_license(LICENSES GPL-2.0-only FILES ${ALL_SOURCE_FILES}) @@ -58,7 +72,9 @@ if(DEFINED KDEPIM_DEV_VERSION) set(KDEPIM_DEV_VERSION " ${KDEPIM_DEV_VERSION}") endif() -set(KDEPIM_VERSION "${PIM_VERSION}${KDEPIM_DEV_VERSION} (${RELEASE_SERVICE_VERSION})") +set(KDEPIM_VERSION + "${PIM_VERSION}${KDEPIM_DEV_VERSION} (${RELEASE_SERVICE_VERSION})" +) set(KDEPIM_LIB_VERSION "${PIM_VERSION}") set(KDEPIM_LIB_SOVERSION "6") @@ -91,9 +107,9 @@ find_package(KF6StatusNotifierItem ${KF_MIN_VERSION} REQUIRED) find_package(KF6IconThemes ${KF_MIN_VERSION} QUIET) find_package(KF6DocTools ${KF_MIN_VERSION}) -set_package_properties(KF6DocTools PROPERTIES DESCRIPTION - "Tools to generate documentation" - TYPE OPTIONAL +set_package_properties( + KF6DocTools + PROPERTIES DESCRIPTION "Tools to generate documentation" TYPE OPTIONAL ) if(NOT WIN32 AND NOT APPLE) @@ -103,7 +119,12 @@ endif() # Find KdepimLibs Package find_package(KPim6Akonadi ${AKONADI_VERSION} CONFIG REQUIRED) find_package(KF6Contacts ${KF_MIN_VERSION} CONFIG REQUIRED) -find_package(KPim6IdentityManagementCore ${IDENTITYMANAGEMENT_LIB_VERSION} CONFIG REQUIRED) +find_package( + KPim6IdentityManagementCore + ${IDENTITYMANAGEMENT_LIB_VERSION} + CONFIG + REQUIRED +) find_package(KPim6MailCommon ${MAILCOMMON_LIB_VERSION} CONFIG REQUIRED) find_package(KPim6MailTransport ${KMAILTRANSPORT_LIB_VERSION} CONFIG REQUIRED) find_package(KPim6Mime ${KMIME_LIB_VERSION} CONFIG REQUIRED) @@ -111,33 +132,53 @@ find_package(KPim6PimCommonAkonadi ${PIMCOMMON_LIB_VERSION} CONFIG REQUIRED) find_package(KF6CalendarCore ${KF_MIN_VERSION} CONFIG REQUIRED) find_package(KF6TextCustomEditor ${KTEXTADDONS_MIN_VERSION} CONFIG REQUIRED) find_package(KF6UserFeedback ${KF_MIN_VERSION} CONFIG) -set_package_properties(KF6UserFeedback PROPERTIES DESCRIPTION "User Feedback lib" TYPE OPTIONAL PURPOSE "Allow to send Telemetry Information (optional). It can be disable in apps.") +set_package_properties( + KF6UserFeedback + PROPERTIES + DESCRIPTION "User Feedback lib" + TYPE OPTIONAL + PURPOSE + "Allow to send Telemetry Information (optional). It can be disable in apps." +) if(TARGET KF6::UserFeedbackWidgets) - set(PIMDATAEXPORTER_WITH_KUSERFEEDBACK true) + set(PIMDATAEXPORTER_WITH_KUSERFEEDBACK true) endif() -include_directories(${pim-data-exporter_SOURCE_DIR} ${pim-data-exporter_BINARY_DIR}) +include_directories( + ${pim-data-exporter_SOURCE_DIR} + ${pim-data-exporter_BINARY_DIR} +) add_definitions(-DTRANSLATION_DOMAIN=\"pimdataexporter\") add_definitions(-DQT_NO_CONTEXTLESS_CONNECT) ecm_set_disabled_deprecation_versions(QT 6.9.0 KF 6.15.0) - -option(USE_UNITY_CMAKE_SUPPORT "Use UNITY cmake support (speedup compile time)" OFF) +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() -configure_file(pimdataexporter-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/pimdataexporter-version.h @ONLY) +configure_file( + pimdataexporter-version.h.in + ${CMAKE_CURRENT_BINARY_DIR}/pimdataexporter-version.h + @ONLY +) if(BUILD_TESTING) - add_definitions(-DBUILD_TESTING) + add_definitions(-DBUILD_TESTING) endif() -configure_file(config-pimdataexporter.h.in ${CMAKE_CURRENT_BINARY_DIR}/config-pimdataexporter.h) +configure_file( + config-pimdataexporter.h.in + ${CMAKE_CURRENT_BINARY_DIR}/config-pimdataexporter.h +) add_subdirectory(core) add_subdirectory(gui) @@ -149,13 +190,17 @@ ecm_qt_install_logging_categories( DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} ) - -install(FILES org.kde.pimdataexporter.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) +install( + FILES org.kde.pimdataexporter.appdata.xml + DESTINATION ${KDE_INSTALL_METAINFODIR} +) if(KF6DocTools_FOUND) kdoctools_install(po) add_subdirectory(doc) endif() -kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT) +if(DEFINED kde_configure_git_pre_commit_hook) + kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT) +endif() ki18n_install(po) ecm_feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/LICENSES/GPL-2.0-or-later.txt b/LICENSES/GPL-2.0-or-later.txt index 1d80ac36..96e2bf1e 100644 --- a/LICENSES/GPL-2.0-or-later.txt +++ b/LICENSES/GPL-2.0-or-later.txt @@ -2,7 +2,7 @@ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 -Copyright (C) 1989, 1991 Free Software Foundation, Inc. +Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 00000000..204b93da --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,19 @@ +MIT License Copyright (c) <year> <copyright holders> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/TODO b/TODO index 0079fd1d..76af3b3c 100644 --- a/TODO +++ b/TODO @@ -4,6 +4,6 @@ TODO 5.15: - templatesconfigurationrc (Need to merge in existing config file) - akonadi_archivemail_agentrc (Need to merge in existing config file) - Allow to merge KMail Snippet config -- Add export mode +- Add export mode - Add support for store kaddressbook printing theme. - Add support for import/export other akonadi resources (facebook ? google ? etc.) diff --git a/console/CMakeLists.txt b/console/CMakeLists.txt index b7471d62..9ee89d0b 100644 --- a/console/CMakeLists.txt +++ b/console/CMakeLists.txt @@ -1,40 +1,47 @@ # SPDX-FileCopyrightText: 2011-2025 Laurent Montel <[email protected]> # SPDX-License-Identifier: BSD-3-Clause -include_directories(${AKONADI_INCLUDE_DIR} +include_directories( + ${AKONADI_INCLUDE_DIR} ${pim-data-exporter_SOURCE_DIR}/core/ ) add_executable(pimdataexporterconsole) -target_sources(pimdataexporterconsole PRIVATE - importexportprogressindicatorconsole.cpp - pimdataexporterconsole.cpp - loginfo.cpp - loginfile.cpp - main.cpp - importexportprogressindicatorconsole.h - pimdataexporterconsole.h - loginfo.h - loginfile.h +target_sources( + pimdataexporterconsole + PRIVATE + importexportprogressindicatorconsole.cpp + pimdataexporterconsole.cpp + loginfo.cpp + loginfile.cpp + main.cpp + importexportprogressindicatorconsole.h + pimdataexporterconsole.h + loginfo.h + loginfile.h ) - ecm_qt_declare_logging_category(pimdataexporterconsole HEADER pimdataexportconsole_debug.h IDENTIFIER PIMDATAEXPORTERCONSOLE_LOG CATEGORY_NAME org.kde.pim.pimdataexporterconsole DESCRIPTION "pimdataexporter (pimdataexporter console)" OLD_CATEGORY_NAMES log_pimsettingexporterconsole org.kde.pim.pimsettingexporterconsole EXPORT PIMDATAEXPORTER ) - if(COMPILE_WITH_UNITY_CMAKE_SUPPORT) set_target_properties(pimdataexporterconsole PROPERTIES UNITY_BUILD ON) endif() -target_link_libraries(pimdataexporterconsole KF6::ConfigCore KF6::CoreAddons KF6::I18n KF6::Archive KPim6::AkonadiCore KPim6::MailCommon +target_link_libraries( + pimdataexporterconsole + KF6::ConfigCore + KF6::CoreAddons + KF6::I18n + KF6::Archive + KPim6::AkonadiCore + KPim6::MailCommon pimdataexporterprivate ) if(BUILD_TESTING) add_subdirectory(autotests) endif() install(TARGETS pimdataexporterconsole ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) - diff --git a/console/autotests/CMakeLists.txt b/console/autotests/CMakeLists.txt index 8d0cc6eb..ba9b4e0c 100644 --- a/console/autotests/CMakeLists.txt +++ b/console/autotests/CMakeLists.txt @@ -2,16 +2,20 @@ # SPDX-License-Identifier: BSD-3-Clause set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) -include_directories( - ${pim-data-exporter_BINARY_DIR}/console/ -) +include_directories(${pim-data-exporter_BINARY_DIR}/console/) ecm_qt_declare_logging_category(pimdataexporterconsole_loginfiletest_SRCS HEADER pimdataexportconsole_debug.h IDENTIFIER PIMDATAEXPORTERCONSOLE_LOG CATEGORY_NAME org.kde.pim.pimdataexporterconsole) - - -add_executable(pimdataexporterconsole_loginfiletest loginfiletest.cpp loginfiletest.h ../loginfile.cpp ${pimdataexporterconsole_loginfiletest_SRCS}) -add_test(NAME pimdataexporterconsole_loginfiletest COMMAND pimdataexporterconsole_loginfiletest) +add_executable( + pimdataexporterconsole_loginfiletest + loginfiletest.cpp + loginfiletest.h + ../loginfile.cpp + ${pimdataexporterconsole_loginfiletest_SRCS} +) +add_test( + NAME pimdataexporterconsole_loginfiletest + COMMAND pimdataexporterconsole_loginfiletest +) ecm_mark_as_test(pimdataexporterconsole_loginfiletest) target_link_libraries(pimdataexporterconsole_loginfiletest Qt::Test) - diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 22a2212e..0f625a7d 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -2,97 +2,90 @@ # SPDX-License-Identifier: BSD-3-Clause add_library(pimdataexporterprivate) -target_sources(pimdataexporterprivate PRIVATE - calendar/exportcalendarjobinterfaceimpl.cpp - calendar/importcalendarjobinterfaceimpl.cpp - - addressbook/exportaddressbookjobinterfaceimpl.cpp - addressbook/importaddressbookjobinterfaceimpl.cpp - - mail/exportmailjobinterfaceimpl.cpp - mail/importmailjobinterfaceimpl.cpp - mail/importexportmailutil.cpp - mail/smtpmailtransport.cpp - - alarm/exportalarmjobinterfaceimpl.cpp - alarm/importalarmjobinterfaceimpl.cpp - - calendar/exportcalendarjobinterface.cpp - calendar/importcalendarjobinterface.cpp - addressbook/exportaddressbookjobinterface.cpp - addressbook/importaddressbookjobinterface.cpp - alarm/importalarmjobinterface.cpp - alarm/exportalarmjobinterface.cpp - mail/exportmailjobinterface.cpp - mail/importmailjobinterface.cpp - - xml/templateselection.cpp - akregator/exportakregatorjobinterface.cpp - akregator/importakregatorjobinterface.cpp - - abstractimportexportjob.cpp - pimdataexporterkernel.cpp - utils.cpp - archivestorage.cpp - synchronizeresourcejob.cpp - pimdatabackuprestore.cpp - importexportprogressindicatorbase.cpp - pimdatabackupthread.cpp - exportresourcearchivejob.cpp - pimdataimportdatainfofile.cpp - resourceconverterbase.cpp - resourceconverterimpl.cpp - storeresourcejob.cpp - backupresourcefilejobbase.cpp - backupresourcefilejobimpl.cpp - utils.h - alarm/exportalarmjobinterface.h - alarm/importalarmjobinterfaceimpl.h - alarm/exportalarmjobinterfaceimpl.h - alarm/importalarmjobinterface.h - abstractimportexportjob.h - backupresourcefilejobimpl.h - akregator/importakregatorjobinterface.h - akregator/exportakregatorjobinterface.h - pimdatabackupthread.h - xml/templateselection.h - pimdataimportdatainfofile.h - mail/smtpmailtransport.h - mail/importmailjobinterfaceimpl.h - mail/importmailjobinterface.h - mail/exportmailjobinterfaceimpl.h - mail/importexportmailutil.h - mail/exportmailjobinterface.h - resourceconverterbase.h - storeresourcejob.h - calendar/exportcalendarjobinterfaceimpl.h - calendar/importcalendarjobinterfaceimpl.h - calendar/exportcalendarjobinterface.h - calendar/importcalendarjobinterface.h - pimdataexporterkernel.h - importexportprogressindicatorbase.h - resourceconverterimpl.h - archivestorage.h - pimdataexportercore_private_export.h - pimdatabackuprestore.h - addressbook/exportaddressbookjobinterface.h - addressbook/exportaddressbookjobinterfaceimpl.h - addressbook/importaddressbookjobinterfaceimpl.h - addressbook/importaddressbookjobinterface.h - exportresourcearchivejob.h - synchronizeresourcejob.h - backupresourcefilejobbase.h - - mail/exportmailfolderattributejob.h - mail/exportmailfolderattributejob.cpp - mail/exportmailfolderattributejobimpl.h - mail/exportmailfolderattributejobimpl.cpp - - mail/importmailfolderattributejob.h - mail/importmailfolderattributejob.cpp - mail/importmailfolderattributejobimpl.h - mail/importmailfolderattributejobimpl.cpp - +target_sources( + pimdataexporterprivate + PRIVATE + calendar/exportcalendarjobinterfaceimpl.cpp + calendar/importcalendarjobinterfaceimpl.cpp + addressbook/exportaddressbookjobinterfaceimpl.cpp + addressbook/importaddressbookjobinterfaceimpl.cpp + mail/exportmailjobinterfaceimpl.cpp + mail/importmailjobinterfaceimpl.cpp + mail/importexportmailutil.cpp + mail/smtpmailtransport.cpp + alarm/exportalarmjobinterfaceimpl.cpp + alarm/importalarmjobinterfaceimpl.cpp + calendar/exportcalendarjobinterface.cpp + calendar/importcalendarjobinterface.cpp + addressbook/exportaddressbookjobinterface.cpp + addressbook/importaddressbookjobinterface.cpp + alarm/importalarmjobinterface.cpp + alarm/exportalarmjobinterface.cpp + mail/exportmailjobinterface.cpp + mail/importmailjobinterface.cpp + xml/templateselection.cpp + akregator/exportakregatorjobinterface.cpp + akregator/importakregatorjobinterface.cpp + abstractimportexportjob.cpp + pimdataexporterkernel.cpp + utils.cpp + archivestorage.cpp + synchronizeresourcejob.cpp + pimdatabackuprestore.cpp + importexportprogressindicatorbase.cpp + pimdatabackupthread.cpp + exportresourcearchivejob.cpp + pimdataimportdatainfofile.cpp + resourceconverterbase.cpp + resourceconverterimpl.cpp + storeresourcejob.cpp + backupresourcefilejobbase.cpp + backupresourcefilejobimpl.cpp + utils.h + alarm/exportalarmjobinterface.h + alarm/importalarmjobinterfaceimpl.h + alarm/exportalarmjobinterfaceimpl.h + alarm/importalarmjobinterface.h + abstractimportexportjob.h + backupresourcefilejobimpl.h + akregator/importakregatorjobinterface.h + akregator/exportakregatorjobinterface.h + pimdatabackupthread.h + xml/templateselection.h + pimdataimportdatainfofile.h + mail/smtpmailtransport.h + mail/importmailjobinterfaceimpl.h + mail/importmailjobinterface.h + mail/exportmailjobinterfaceimpl.h + mail/importexportmailutil.h + mail/exportmailjobinterface.h + resourceconverterbase.h + storeresourcejob.h + calendar/exportcalendarjobinterfaceimpl.h + calendar/importcalendarjobinterfaceimpl.h + calendar/exportcalendarjobinterface.h + calendar/importcalendarjobinterface.h + pimdataexporterkernel.h + importexportprogressindicatorbase.h + resourceconverterimpl.h + archivestorage.h + pimdataexportercore_private_export.h + pimdatabackuprestore.h + addressbook/exportaddressbookjobinterface.h + addressbook/exportaddressbookjobinterfaceimpl.h + addressbook/importaddressbookjobinterfaceimpl.h + addressbook/importaddressbookjobinterface.h + exportresourcearchivejob.h + synchronizeresourcejob.h + backupresourcefilejobbase.h + mail/exportmailfolderattributejob.h + mail/exportmailfolderattributejob.cpp + mail/exportmailfolderattributejobimpl.h + mail/exportmailfolderattributejobimpl.cpp + mail/importmailfolderattributejob.h + mail/importmailfolderattributejob.cpp + mail/importmailfolderattributejobimpl.h + mail/importmailfolderattributejobimpl.cpp ) ecm_qt_declare_logging_category(pimdataexporterprivate HEADER pimdataexportcore_debug.h IDENTIFIER PIMDATAEXPORTERCORE_LOG CATEGORY_NAME org.kde.pim.pimdataexportercore @@ -101,32 +94,35 @@ ecm_qt_declare_logging_category(pimdataexporterprivate HEADER pimdataexportcore_ EXPORT PIMDATAEXPORTER ) - if(COMPILE_WITH_UNITY_CMAKE_SUPPORT) set_target_properties(pimdataexporterprivate PROPERTIES UNITY_BUILD ON) endif() generate_export_header(pimdataexporterprivate BASE_NAME pimdataexporter) - - -target_link_libraries(pimdataexporterprivate +target_link_libraries( + pimdataexporterprivate PRIVATE - KPim6::AkonadiCore - KPim6::Mime - KPim6::MailTransport - KPim6::MailCommon - KF6::Archive - KPim6::PimCommonAkonadi - KF6::I18n - KF6::CalendarCore + KPim6::AkonadiCore + KPim6::Mime + KPim6::MailTransport + KPim6::MailCommon + KF6::Archive + KPim6::PimCommonAkonadi + KF6::I18n + KF6::CalendarCore ) -set_target_properties(pimdataexporterprivate PROPERTIES VERSION ${KDEPIM_LIB_VERSION} SOVERSION ${KDEPIM_LIB_SOVERSION}) +set_target_properties( + pimdataexporterprivate + PROPERTIES VERSION ${KDEPIM_LIB_VERSION} SOVERSION ${KDEPIM_LIB_SOVERSION} +) -install(TARGETS pimdataexporterprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) +install( + TARGETS pimdataexporterprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} + LIBRARY NAMELINK_SKIP +) if(BUILD_TESTING) add_subdirectory(autotests) endif() - diff --git a/core/akregator/exportakregatorjobinterface.cpp b/core/akregator/exportakregatorjobinterface.cpp index 3aaeb23f..271b35b9 100644 --- a/core/akregator/exportakregatorjobinterface.cpp +++ b/core/akregator/exportakregatorjobinterface.cpp @@ -36,7 +36,7 @@ Akonadi::Collection::Id ExportAkregatorJobInterface::convertFolderPathToCollecti { Q_UNUSED(path); Q_UNREACHABLE(); - // Unusued + // Unused return -1; } diff --git a/core/autotests/CMakeLists.txt b/core/autotests/CMakeLists.txt index 642206ea..ff0ed6f8 100644 --- a/core/autotests/CMakeLists.txt +++ b/core/autotests/CMakeLists.txt @@ -9,7 +9,9 @@ ecm_mark_as_test(utilstest) target_link_libraries(utilstest Qt::Test pimdataexporterprivate KF6::ConfigCore) ##### -add_library(test_resourceconverter STATIC +add_library( + test_resourceconverter + STATIC resourceconvertertest.cpp generatelistfilefromarchive.cpp loadlistfromfile.cpp @@ -42,20 +44,51 @@ add_library(test_resourceconverter STATIC if(COMPILE_WITH_UNITY_CMAKE_SUPPORT) set_target_properties(test_resourceconverter PROPERTIES UNITY_BUILD ON) endif() -target_link_libraries(test_resourceconverter PUBLIC KF6::ConfigCore pimdataexporterprivate KF6::Archive Qt::Test KPim6::AkonadiMime KPim6::AkonadiCore KF6::WidgetsAddons) - +target_link_libraries( + test_resourceconverter + PUBLIC + KF6::ConfigCore + pimdataexporterprivate + KF6::Archive + Qt::Test + KPim6::AkonadiMime + KPim6::AkonadiCore + KF6::WidgetsAddons +) ##### -add_executable(resourceconverterclasstest resourceconverterclasstest.cpp resourceconverterclasstest.h) +add_executable( + resourceconverterclasstest + resourceconverterclasstest.cpp + resourceconverterclasstest.h +) add_test(NAME resourceconverterclasstest COMMAND resourceconverterclasstest) ecm_mark_as_test(resourceconverterclasstest) -target_link_libraries(resourceconverterclasstest Qt::Test KF6::ConfigCore test_resourceconverter) +target_link_libraries( + resourceconverterclasstest + Qt::Test + KF6::ConfigCore + test_resourceconverter +) ##### -add_executable(backupresourcefilejobimpltest backupresourcefilejobimpltest.cpp backupresourcefilejobimpltest.h) -add_test(NAME backupresourcefilejobimpltest COMMAND backupresourcefilejobimpltest) +add_executable( + backupresourcefilejobimpltest + backupresourcefilejobimpltest.cpp + backupresourcefilejobimpltest.h +) +add_test( + NAME backupresourcefilejobimpltest + COMMAND backupresourcefilejobimpltest +) ecm_mark_as_test(backupresourcefilejobimpltest) -target_link_libraries(backupresourcefilejobimpltest Qt::Test KF6::ConfigCore pimdataexporterprivate KF6::Archive) +target_link_libraries( + backupresourcefilejobimpltest + Qt::Test + KF6::ConfigCore + pimdataexporterprivate + KF6::Archive +) ### add_subdirectory(calendar) diff --git a/core/autotests/addressbook/CMakeLists.txt b/core/autotests/addressbook/CMakeLists.txt index 6e4ac8e8..11b35e13 100644 --- a/core/autotests/addressbook/CMakeLists.txt +++ b/core/autotests/addressbook/CMakeLists.txt @@ -2,19 +2,51 @@ # SPDX-License-Identifier: BSD-3-Clause add_definitions(-DPIMDATAEXPORTER_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data") -set(exportaddressbookjobinterfacetest_SRCS exportaddressbookjobinterfacetest.cpp exportaddressbookjobinterfacetestimpl.cpp - exportaddressbookjobinterfacetest.h exportaddressbookjobinterfacetestimpl.h) +set(exportaddressbookjobinterfacetest_SRCS + exportaddressbookjobinterfacetest.cpp + exportaddressbookjobinterfacetestimpl.cpp + exportaddressbookjobinterfacetest.h + exportaddressbookjobinterfacetestimpl.h +) -add_executable(exportaddressbookjobinterfacetest ${exportaddressbookjobinterfacetest_SRCS}) -add_test(NAME exportaddressbookjobinterfacetest COMMAND exportaddressbookjobinterfacetest) +add_executable( + exportaddressbookjobinterfacetest + ${exportaddressbookjobinterfacetest_SRCS} +) +add_test( + NAME exportaddressbookjobinterfacetest + COMMAND exportaddressbookjobinterfacetest +) ecm_mark_as_test(exportaddressbookjobinterfacetest) -target_link_libraries(exportaddressbookjobinterfacetest Qt::Test pimdataexporterprivate KF6::ConfigCore test_resourceconverter) +target_link_libraries( + exportaddressbookjobinterfacetest + Qt::Test + pimdataexporterprivate + KF6::ConfigCore + test_resourceconverter +) ##### -set(importaddressbookjobinterfacetest_SRCS importaddressbookjobinterfacetest.cpp importaddressbookjobinterfacetestimpl.cpp - importaddressbookjobinterfacetest.h importaddressbookjobinterfacetestimpl.h) +set(importaddressbookjobinterfacetest_SRCS + importaddressbookjobinterfacetest.cpp + importaddressbookjobinterfacetestimpl.cpp + importaddressbookjobinterfacetest.h + importaddressbookjobinterfacetestimpl.h +) -add_executable(importaddressbookjobinterfacetest ${importaddressbookjobinterfacetest_SRCS}) -add_test(NAME importaddressbookjobinterfacetest COMMAND importaddressbookjobinterfacetest) +add_executable( + importaddressbookjobinterfacetest + ${importaddressbookjobinterfacetest_SRCS} +) +add_test( + NAME importaddressbookjobinterfacetest + COMMAND importaddressbookjobinterfacetest +) ecm_mark_as_test(importaddressbookjobinterfacetest) -target_link_libraries(importaddressbookjobinterfacetest Qt::Test pimdataexporterprivate KF6::ConfigCore test_resourceconverter) +target_link_libraries( + importaddressbookjobinterfacetest + Qt::Test + pimdataexporterprivate + KF6::ConfigCore + test_resourceconverter +) diff --git a/core/autotests/akregator/CMakeLists.txt b/core/autotests/akregator/CMakeLists.txt index dd764c4b..f8267aa3 100644 --- a/core/autotests/akregator/CMakeLists.txt +++ b/core/autotests/akregator/CMakeLists.txt @@ -2,21 +2,52 @@ # SPDX-License-Identifier: BSD-3-Clause add_definitions(-DPIMDATAEXPORTER_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data") +set(exportakregatorjobinterfacetest_SRCS + exportakregatorjobinterfacetest.cpp + exportakregatorjobinterfacetestimpl.cpp + exportakregatorjobinterfacetest.h + exportakregatorjobinterfacetestimpl.h +) -set(exportakregatorjobinterfacetest_SRCS exportakregatorjobinterfacetest.cpp exportakregatorjobinterfacetestimpl.cpp - exportakregatorjobinterfacetest.h exportakregatorjobinterfacetestimpl.h) - -add_executable(exportakregatorjobinterfacetest ${exportakregatorjobinterfacetest_SRCS}) -add_test(NAME exportakregatorjobinterfacetest COMMAND exportakregatorjobinterfacetest) +add_executable( + exportakregatorjobinterfacetest + ${exportakregatorjobinterfacetest_SRCS} +) +add_test( + NAME exportakregatorjobinterfacetest + COMMAND exportakregatorjobinterfacetest +) ecm_mark_as_test(exportakregatorjobinterfacetest) -target_link_libraries(exportakregatorjobinterfacetest Qt::Test pimdataexporterprivate KF6::ConfigCore test_resourceconverter) +target_link_libraries( + exportakregatorjobinterfacetest + Qt::Test + pimdataexporterprivate + KF6::ConfigCore + test_resourceconverter +) ##### -set(importakregatorjobinterfacetest_SRCS importakregatorjobinterfacetest.cpp importakregatorjobinterfacetestimpl.cpp - importakregatorjobinterfacetest.h importakregatorjobinterfacetestimpl.h) +set(importakregatorjobinterfacetest_SRCS + importakregatorjobinterfacetest.cpp + importakregatorjobinterfacetestimpl.cpp + importakregatorjobinterfacetest.h + importakregatorjobinterfacetestimpl.h +) -add_executable(importakregatorjobinterfacetest ${importakregatorjobinterfacetest_SRCS}) -add_test(NAME importakregatorjobinterfacetest COMMAND importakregatorjobinterfacetest) +add_executable( + importakregatorjobinterfacetest + ${importakregatorjobinterfacetest_SRCS} +) +add_test( + NAME importakregatorjobinterfacetest + COMMAND importakregatorjobinterfacetest +) ecm_mark_as_test(importakregatorjobinterfacetest) -target_link_libraries(importakregatorjobinterfacetest Qt::Test pimdataexporterprivate KF6::ConfigCore test_resourceconverter) +target_link_libraries( + importakregatorjobinterfacetest + Qt::Test + pimdataexporterprivate + KF6::ConfigCore + test_resourceconverter +) diff --git a/core/autotests/alarm/CMakeLists.txt b/core/autotests/alarm/CMakeLists.txt index 3065e420..6ae06c4f 100644 --- a/core/autotests/alarm/CMakeLists.txt +++ b/core/autotests/alarm/CMakeLists.txt @@ -2,21 +2,40 @@ # SPDX-License-Identifier: BSD-3-Clause add_definitions(-DPIMDATAEXPORTER_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data") - -set(exportalarmjobinterfacetest_SRCS exportalarmjobinterfacetest.cpp exportalarmjobinterfacetestimpl.cpp - exportalarmjobinterfacetest.h exportalarmjobinterfacetestimpl.h) +set(exportalarmjobinterfacetest_SRCS + exportalarmjobinterfacetest.cpp + exportalarmjobinterfacetestimpl.cpp + exportalarmjobinterfacetest.h + exportalarmjobinterfacetestimpl.h +) add_executable(exportalarmjobinterfacetest ${exportalarmjobinterfacetest_SRCS}) add_test(NAME exportalarmjobinterfacetest COMMAND exportalarmjobinterfacetest) ecm_mark_as_test(exportalarmjobinterfacetest) -target_link_libraries(exportalarmjobinterfacetest Qt::Test pimdataexporterprivate KF6::ConfigCore test_resourceconverter) +target_link_libraries( + exportalarmjobinterfacetest + Qt::Test + pimdataexporterprivate + KF6::ConfigCore + test_resourceconverter +) ##### -set(importalarmjobinterfacetest_SRCS importalarmjobinterfacetest.cpp importalarmjobinterfacetestimpl.cpp - importalarmjobinterfacetest.h importalarmjobinterfacetestimpl.h) +set(importalarmjobinterfacetest_SRCS + importalarmjobinterfacetest.cpp + importalarmjobinterfacetestimpl.cpp + importalarmjobinterfacetest.h + importalarmjobinterfacetestimpl.h +) add_executable(importalarmjobinterfacetest ${importalarmjobinterfacetest_SRCS}) add_test(NAME importalarmjobinterfacetest COMMAND importalarmjobinterfacetest) ecm_mark_as_test(importalarmjobinterfacetest) -target_link_libraries(importalarmjobinterfacetest Qt::Test pimdataexporterprivate KF6::ConfigCore test_resourceconverter) +target_link_libraries( + importalarmjobinterfacetest + Qt::Test + pimdataexporterprivate + KF6::ConfigCore + test_resourceconverter +) diff --git a/core/autotests/calendar/CMakeLists.txt b/core/autotests/calendar/CMakeLists.txt index 90b6f8cb..f8a85d51 100644 --- a/core/autotests/calendar/CMakeLists.txt +++ b/core/autotests/calendar/CMakeLists.txt @@ -2,21 +2,52 @@ # SPDX-License-Identifier: BSD-3-Clause add_definitions(-DPIMDATAEXPORTER_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data") +set(exportcalendarsjobinterfacetest_SRCS + exportcalendarsjobinterfacetest.cpp + exportcalendarsjobinterfacetestimpl.cpp + exportcalendarsjobinterfacetest.h + exportcalendarsjobinterfacetestimpl.h +) -set(exportcalendarsjobinterfacetest_SRCS exportcalendarsjobinterfacetest.cpp exportcalendarsjobinterfacetestimpl.cpp - exportcalendarsjobinterfacetest.h exportcalendarsjobinterfacetestimpl.h) - -add_executable(exportcalendarsjobinterfacetest ${exportcalendarsjobinterfacetest_SRCS}) -add_test(NAME exportcalendarsjobinterfacetest COMMAND exportcalendarsjobinterfacetest) +add_executable( + exportcalendarsjobinterfacetest + ${exportcalendarsjobinterfacetest_SRCS} +) +add_test( + NAME exportcalendarsjobinterfacetest + COMMAND exportcalendarsjobinterfacetest +) ecm_mark_as_test(exportcalendarsjobinterfacetest) -target_link_libraries(exportcalendarsjobinterfacetest Qt::Test pimdataexporterprivate KF6::ConfigCore test_resourceconverter) +target_link_libraries( + exportcalendarsjobinterfacetest + Qt::Test + pimdataexporterprivate + KF6::ConfigCore + test_resourceconverter +) ##### -set(importcalendarjobinterfacetest_SRCS importcalendarjobinterfacetest.cpp importcalendarjobinterfacetestimpl.cpp - importcalendarjobinterfacetest.h importcalendarjobinterfacetestimpl.h) +set(importcalendarjobinterfacetest_SRCS + importcalendarjobinterfacetest.cpp + importcalendarjobinterfacetestimpl.cpp + importcalendarjobinterfacetest.h + importcalendarjobinterfacetestimpl.h +) -add_executable(importcalendarjobinterfacetest ${importcalendarjobinterfacetest_SRCS}) -add_test(NAME importcalendarjobinterfacetest COMMAND importcalendarjobinterfacetest) +add_executable( + importcalendarjobinterfacetest + ${importcalendarjobinterfacetest_SRCS} +) +add_test( + NAME importcalendarjobinterfacetest + COMMAND importcalendarjobinterfacetest +) ecm_mark_as_test(importcalendarjobinterfacetest) -target_link_libraries(importcalendarjobinterfacetest Qt::Test pimdataexporterprivate KF6::ConfigCore test_resourceconverter) +target_link_libraries( + importcalendarjobinterfacetest + Qt::Test + pimdataexporterprivate + KF6::ConfigCore + test_resourceconverter +) diff --git a/core/autotests/mail/CMakeLists.txt b/core/autotests/mail/CMakeLists.txt index c3c27f36..b73a4ccc 100644 --- a/core/autotests/mail/CMakeLists.txt +++ b/core/autotests/mail/CMakeLists.txt @@ -2,41 +2,94 @@ # SPDX-License-Identifier: BSD-3-Clause add_definitions(-DPIMDATAEXPORTER_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data") - - add_executable(exportmailjobinterfacetest) -target_sources(exportmailjobinterfacetest PRIVATE exportmailjobinterfacetest.cpp exportmailjobinterfacetestimpl.cpp - exportmailjobinterfacetest.h exportmailjobinterfacetestimpl.h - exportmailfolderattributejobtestimpl.h exportmailfolderattributejobtestimpl.cpp) +target_sources( + exportmailjobinterfacetest + PRIVATE + exportmailjobinterfacetest.cpp + exportmailjobinterfacetestimpl.cpp + exportmailjobinterfacetest.h + exportmailjobinterfacetestimpl.h + exportmailfolderattributejobtestimpl.h + exportmailfolderattributejobtestimpl.cpp +) add_test(NAME exportmailjobinterfacetest COMMAND exportmailjobinterfacetest) ecm_mark_as_test(exportmailjobinterfacetest) -target_link_libraries(exportmailjobinterfacetest Qt::Test pimdataexporterprivate KF6::ConfigCore test_resourceconverter KPim6::Mime) +target_link_libraries( + exportmailjobinterfacetest + Qt::Test + pimdataexporterprivate + KF6::ConfigCore + test_resourceconverter + KPim6::Mime +) ##### - add_executable(importmailjobinterfacetest) -target_sources(importmailjobinterfacetest PRIVATE importmailjobinterfacetest.cpp - importmailjobinterfacetestimpl.cpp - importmailjobinterfacetest.h importmailjobinterfacetestimpl.h - importmailfolderattributejobtestimpl.h importmailfolderattributejobtestimpl.cpp) +target_sources( + importmailjobinterfacetest + PRIVATE + importmailjobinterfacetest.cpp + importmailjobinterfacetestimpl.cpp + importmailjobinterfacetest.h + importmailjobinterfacetestimpl.h + importmailfolderattributejobtestimpl.h + importmailfolderattributejobtestimpl.cpp +) add_test(NAME importmailjobinterfacetest COMMAND importmailjobinterfacetest) ecm_mark_as_test(importmailjobinterfacetest) -target_link_libraries(importmailjobinterfacetest Qt::Test pimdataexporterprivate KF6::ConfigCore KPim6::AkonadiCore KPim6::AkonadiMime test_resourceconverter KPim6::IdentityManagementCore KPim6::Mime) +target_link_libraries( + importmailjobinterfacetest + Qt::Test + pimdataexporterprivate + KF6::ConfigCore + KPim6::AkonadiCore + KPim6::AkonadiMime + test_resourceconverter + KPim6::IdentityManagementCore + KPim6::Mime +) ##### add_executable(exportmailfolderattributejobtest) -target_sources(exportmailfolderattributejobtest PRIVATE exportmailfolderattributejobtest.cpp exportmailfolderattributejobtest.h) -add_test(NAME exportmailfolderattributejobtest COMMAND exportmailfolderattributejobtest) +target_sources( + exportmailfolderattributejobtest + PRIVATE + exportmailfolderattributejobtest.cpp + exportmailfolderattributejobtest.h +) +add_test( + NAME exportmailfolderattributejobtest + COMMAND exportmailfolderattributejobtest +) ecm_mark_as_test(exportmailfolderattributejobtest) -target_link_libraries(exportmailfolderattributejobtest Qt::Test pimdataexporterprivate KF6::ConfigCore) +target_link_libraries( + exportmailfolderattributejobtest + Qt::Test + pimdataexporterprivate + KF6::ConfigCore +) ##### add_executable(importmailfolderattributejobtest) -target_sources(importmailfolderattributejobtest PRIVATE importmailfolderattributejobtest.cpp importmailfolderattributejobtest.h) -add_test(NAME importmailfolderattributejobtest COMMAND importmailfolderattributejobtest) +target_sources( + importmailfolderattributejobtest + PRIVATE + importmailfolderattributejobtest.cpp + importmailfolderattributejobtest.h +) +add_test( + NAME importmailfolderattributejobtest + COMMAND importmailfolderattributejobtest +) ecm_mark_as_test(importmailfolderattributejobtest) -target_link_libraries(importmailfolderattributejobtest Qt::Test pimdataexporterprivate KPim6::AkonadiCore KF6::ConfigCore) - +target_link_libraries( + importmailfolderattributejobtest + Qt::Test + pimdataexporterprivate + KPim6::AkonadiCore + KF6::ConfigCore +) diff --git a/core/mail/exportmailfolderattributejobimpl.cpp b/core/mail/exportmailfolderattributejobimpl.cpp index d6d0456c..cd7e09ac 100644 --- a/core/mail/exportmailfolderattributejobimpl.cpp +++ b/core/mail/exportmailfolderattributejobimpl.cpp @@ -44,7 +44,7 @@ void ExportMailFolderAttributeJobImpl::slotFetchFinished(KJob *job) const Akonadi::Collection::List cols = list->collections(); if (cols.isEmpty()) { Q_EMIT successed(); - qCWarning(PIMDATAEXPORTERCORE_LOG) << "It seems wierd that there is not collection."; + qCWarning(PIMDATAEXPORTERCORE_LOG) << "It seems weird that there is not collection."; deleteLater(); return; } diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 2e56c8aa..2108e3ef 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -4,4 +4,3 @@ # # kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR pimdataexporter) - diff --git a/doc/index.docbook b/doc/index.docbook index 6daf431a..552eb3e9 100644 --- a/doc/index.docbook +++ b/doc/index.docbook @@ -5,7 +5,7 @@ CVS --> <!ENTITY i18n-pimdataexporter "<application>PIM Data Exporter</application>"> <!ENTITY % addindex "IGNORE"> - <!ENTITY % English "INCLUDE"> + <!ENTITY % English "INCLUDE"> <!ENTITY imap "<acronym>IMAP</acronym>"> ]> diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 68f6bb19..b6070139 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -13,58 +13,53 @@ endif() set(pimdataexporter_userfeedback_SRCS) if(TARGET KF6::UserFeedbackWidgets) - target_sources(pimdataexporter PRIVATE - userfeedback/userfeedbackmanager.cpp - userfeedback/pimdataexporteduserfeedbackprovider.cpp - userfeedback/userfeedbackmanager.h - userfeedback/pimdataexporteduserfeedbackprovider.h - -) + target_sources( + pimdataexporter + PRIVATE + userfeedback/userfeedbackmanager.cpp + userfeedback/pimdataexporteduserfeedbackprovider.cpp + userfeedback/userfeedbackmanager.h + userfeedback/pimdataexporteduserfeedbackprovider.h + ) endif() -include_directories( - ${pim-data-exporter_SOURCE_DIR}/core/ -) - +include_directories(${pim-data-exporter_SOURCE_DIR}/core/) kconfig_add_kcfg_files(pimdataexporter settings/pimdataexporterglobalconfig.kcfgc) - -target_sources(pimdataexporter PRIVATE - widgets/selectiontypetreewidget.cpp - widgets/logwidget.cpp - widgets/pimdataexporterconfigurewidget.cpp - - dialog/selectiontypedialog.cpp - dialog/backupfilestructureinfodialog.cpp - dialog/showarchivestructuredialog.cpp - dialog/synchronizeresourcedialog.cpp - dialog/pimdataexporterconfiguredialog.cpp - - job/fullsynchronizeresourcesjob.cpp - - trayicon/pimdatatrayicon.cpp - - pimdatabackuprestoreui.cpp - importexportprogressindicatorgui.cpp - pimdataexporterwindow.cpp - pimdatacommandlineoption.cpp - main.cpp - pimdataexporter.qrc - pimdatacommandlineoption.h - job/fullsynchronizeresourcesjob.h - trayicon/pimdatatrayicon.h - dialog/backupfilestructureinfodialog.h - dialog/pimdataexporterconfiguredialog.h - dialog/selectiontypedialog.h - dialog/showarchivestructuredialog.h - dialog/synchronizeresourcedialog.h - pimdataexporterwindow.h - widgets/selectiontypetreewidget.h - widgets/pimdataexporterconfigurewidget.h - widgets/logwidget.h - pimdatabackuprestoreui.h - importexportprogressindicatorgui.h +target_sources( + pimdataexporter + PRIVATE + widgets/selectiontypetreewidget.cpp + widgets/logwidget.cpp + widgets/pimdataexporterconfigurewidget.cpp + dialog/selectiontypedialog.cpp + dialog/backupfilestructureinfodialog.cpp + dialog/showarchivestructuredialog.cpp + dialog/synchronizeresourcedialog.cpp + dialog/pimdataexporterconfiguredialog.cpp + job/fullsynchronizeresourcesjob.cpp + trayicon/pimdatatrayicon.cpp + pimdatabackuprestoreui.cpp + importexportprogressindicatorgui.cpp + pimdataexporterwindow.cpp + pimdatacommandlineoption.cpp + main.cpp + pimdataexporter.qrc + pimdatacommandlineoption.h + job/fullsynchronizeresourcesjob.h + trayicon/pimdatatrayicon.h + dialog/backupfilestructureinfodialog.h + dialog/pimdataexporterconfiguredialog.h + dialog/selectiontypedialog.h + dialog/showarchivestructuredialog.h + dialog/synchronizeresourcedialog.h + pimdataexporterwindow.h + widgets/selectiontypetreewidget.h + widgets/pimdataexporterconfigurewidget.h + widgets/logwidget.h + pimdatabackuprestoreui.h + importexportprogressindicatorgui.h ) #TODO create lib @@ -75,42 +70,47 @@ if(COMPILE_WITH_UNITY_CMAKE_SUPPORT) endif() if(TARGET KF6::UserFeedbackWidgets) - target_link_libraries(pimdataexporter PRIVATE KF6::UserFeedbackWidgets) + target_link_libraries(pimdataexporter PRIVATE KF6::UserFeedbackWidgets) endif() if(TARGET KF6::IconThemes) target_link_libraries(pimdataexporter PRIVATE KF6::IconThemes) endif() -target_link_libraries(pimdataexporter +target_link_libraries( + pimdataexporter PRIVATE - KF6::XmlGui - KPim6::MailCommon - KPim6::PimCommon - pimdataexporterprivate - KF6::Archive - KF6::ItemViews - KF6::KIOFileWidgets - KF6::Notifications - KF6::I18n - KF6::Crash - KF6::StatusNotifierItem - ${pimdataexporter_userfeedback_LIB} - KF6::WidgetsAddons - KF6::TextCustomEditor + KF6::XmlGui + KPim6::MailCommon + KPim6::PimCommon + pimdataexporterprivate + KF6::Archive + KF6::ItemViews + KF6::KIOFileWidgets + KF6::Notifications + KF6::I18n + KF6::Crash + KF6::StatusNotifierItem + ${pimdataexporter_userfeedback_LIB} + KF6::WidgetsAddons + KF6::TextCustomEditor ) if(TARGET KF6::DBusAddons) target_link_libraries(pimdataexporter PRIVATE KF6::DBusAddons) endif() - install(TARGETS pimdataexporter ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) -install(PROGRAMS org.kde.pimdataexporter.desktop DESTINATION ${KDE_INSTALL_APPDIR}) +install( + PROGRAMS org.kde.pimdataexporter.desktop + DESTINATION ${KDE_INSTALL_APPDIR} +) -install(FILES settings/pimdataexporterglobalconfig.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR}) +install( + FILES settings/pimdataexporterglobalconfig.kcfg + DESTINATION ${KDE_INSTALL_KCFGDIR} +) if(BUILD_TESTING) add_subdirectory(tests) add_subdirectory(autotests) endif() - diff --git a/gui/autotests/CMakeLists.txt b/gui/autotests/CMakeLists.txt index 610e46bf..140fccf7 100644 --- a/gui/autotests/CMakeLists.txt +++ b/gui/autotests/CMakeLists.txt @@ -6,14 +6,29 @@ set(pimdataexporter_kcfg_SRCS ../settings/pimdataexporterglobalconfig.kcfgc) kconfig_add_kcfg_files(pimdataexporter_kcfg_SRCS ${pimdataexporter_kcfg_SRCS}) -add_executable(synchronizeresourcedialogtest synchronizeresourcedialogtest.cpp synchronizeresourcedialogtest.h ../dialog/synchronizeresourcedialog.cpp) -add_test(NAME synchronizeresourcedialogtest COMMAND synchronizeresourcedialogtest) +add_executable( + synchronizeresourcedialogtest + synchronizeresourcedialogtest.cpp + synchronizeresourcedialogtest.h + ../dialog/synchronizeresourcedialog.cpp +) +add_test( + NAME synchronizeresourcedialogtest + COMMAND synchronizeresourcedialogtest +) ecm_mark_as_test(synchronizeresourcedialogtest) -target_link_libraries(synchronizeresourcedialogtest Qt::Test Qt::Widgets KF6::I18n KF6::ItemViews KF6::ConfigGui) +target_link_libraries( + synchronizeresourcedialogtest + Qt::Test + Qt::Widgets + KF6::I18n + KF6::ItemViews + KF6::ConfigGui +) set(pimdataexporter_userfeedback_LIB) if(TARGET KF6::UserFeedbackWidgets) - set(pimdataexporter_userfeedback_LIB KF6::UserFeedbackWidgets) + set(pimdataexporter_userfeedback_LIB KF6::UserFeedbackWidgets) endif() #add_executable(pimdataexporterconfiguredialogtest pimdataexporterconfiguredialogtest.cpp ../dialog/pimdataexporterconfiguredialog.cpp ../widgets/pimdataexporterconfigurewidget.cpp ${pimdataexporter_kcfg_SRCS}) @@ -21,23 +36,67 @@ endif() #ecm_mark_as_test(pimdataexporterconfiguredialogtest) #target_link_libraries(pimdataexporterconfiguredialogtest ${pimdataexporter_userfeedback_LIB} Qt::Test Qt::Widgets KF6::I18n KF6::ItemViews KF6::ConfigCore KF6::ConfigGui KF6::WidgetsAddons) - -add_executable(pimdataexporterconfigurewidgettest pimdataexporterconfigurewidgettest.cpp pimdataexporterconfigurewidgettest.h - ../widgets/pimdataexporterconfigurewidget.cpp ${pimdataexporter_kcfg_SRCS}) -add_test(NAME pimdataexporterconfigurewidgettest COMMAND pimdataexporterconfigurewidgettest) +add_executable( + pimdataexporterconfigurewidgettest + pimdataexporterconfigurewidgettest.cpp + pimdataexporterconfigurewidgettest.h + ../widgets/pimdataexporterconfigurewidget.cpp + ${pimdataexporter_kcfg_SRCS} +) +add_test( + NAME pimdataexporterconfigurewidgettest + COMMAND pimdataexporterconfigurewidgettest +) ecm_mark_as_test(pimdataexporterconfigurewidgettest) -target_link_libraries(pimdataexporterconfigurewidgettest Qt::Test Qt::Widgets KF6::I18n KF6::ItemViews KF6::ConfigCore KF6::ConfigGui) - +target_link_libraries( + pimdataexporterconfigurewidgettest + Qt::Test + Qt::Widgets + KF6::I18n + KF6::ItemViews + KF6::ConfigCore + KF6::ConfigGui +) -add_executable(selectiontypetreewidgettest selectiontypetreewidgettest.cpp selectiontypetreewidgettest.h - ../widgets/selectiontypetreewidget.cpp ${pimdataexporter_kcfg_SRCS}) +add_executable( + selectiontypetreewidgettest + selectiontypetreewidgettest.cpp + selectiontypetreewidgettest.h + ../widgets/selectiontypetreewidget.cpp + ${pimdataexporter_kcfg_SRCS} +) add_test(NAME selectiontypetreewidgettest COMMAND selectiontypetreewidgettest) ecm_mark_as_test(selectiontypetreewidgettest) -target_link_libraries(selectiontypetreewidgettest Qt::Test Qt::Widgets KF6::I18n KF6::ItemViews pimdataexporterprivate KF6::ConfigCore KF6::ConfigGui KPim6::PimCommonAkonadi) - +target_link_libraries( + selectiontypetreewidgettest + Qt::Test + Qt::Widgets + KF6::I18n + KF6::ItemViews + pimdataexporterprivate + KF6::ConfigCore + KF6::ConfigGui + KPim6::PimCommonAkonadi +) -add_executable(selectiontypedialogtest selectiontypedialogtest.h selectiontypedialogtest.cpp - ../widgets/selectiontypetreewidget.cpp ../dialog/selectiontypedialog.cpp ${pimdataexporter_kcfg_SRCS}) +add_executable( + selectiontypedialogtest + selectiontypedialogtest.h + selectiontypedialogtest.cpp + ../widgets/selectiontypetreewidget.cpp + ../dialog/selectiontypedialog.cpp + ${pimdataexporter_kcfg_SRCS} +) add_test(NAME selectiontypedialogtest COMMAND selectiontypedialogtest) ecm_mark_as_test(selectiontypedialogtest) -target_link_libraries(selectiontypedialogtest Qt::Test Qt::Widgets KF6::I18n KF6::ItemViews pimdataexporterprivate KF6::ConfigCore KF6::ConfigGui KPim6::PimCommonAkonadi) +target_link_libraries( + selectiontypedialogtest + Qt::Test + Qt::Widgets + KF6::I18n + KF6::ItemViews + pimdataexporterprivate + KF6::ConfigCore + KF6::ConfigGui + KPim6::PimCommonAkonadi +) diff --git a/gui/backup-structure.txt b/gui/backup-structure.txt index c4ba8a8d..19487360 100644 --- a/gui/backup-structure.txt +++ b/gui/backup-structure.txt @@ -58,7 +58,7 @@ Root | |---------templatesconfigurationrc | |---------kalarmrc | |---------korganizerrc -| |---------calendar_printing.rc +| |---------calendar_printing.rc | |---------kalendaracrc | |---------kaddressbookrc | |---------akonadi_mailfilter_agent.notifyrc @@ -104,7 +104,7 @@ Root | |---------akregator.notifyrc | |---------kontactsummary_part.rc | |---------headerthemeeditorui.rc -| |---------contactprintthemeeditorui.rc +| |---------contactprintthemeeditorui.rc | |---------contactthemeeditorui.rc | |---------kwatchgnupgrc | |---------kwatchgnupgui.rc diff --git a/gui/pimdataexporter.rc b/gui/pimdataexporter.rc index 8becc4e2..192a5aa6 100644 --- a/gui/pimdataexporter.rc +++ b/gui/pimdataexporter.rc @@ -30,4 +30,3 @@ <Action name="restore" /> </ToolBar> </gui> - diff --git a/gui/tests/CMakeLists.txt b/gui/tests/CMakeLists.txt index 71d440e6..e82388c1 100644 --- a/gui/tests/CMakeLists.txt +++ b/gui/tests/CMakeLists.txt @@ -7,9 +7,15 @@ include_directories( ${pim-data-exporter_BINARY_DIR}/gui/ ) -set(selectiontreewidget_gui_SRCS selectiontreewidget_gui.cpp ../dialog/selectiontypedialog.cpp ../widgets/selectiontypetreewidget.cpp ../pimdataexportgui_debug.cpp) +set(selectiontreewidget_gui_SRCS + selectiontreewidget_gui.cpp + ../dialog/selectiontypedialog.cpp + ../widgets/selectiontypetreewidget.cpp + ../pimdataexportgui_debug.cpp +) add_executable(selectiontreewidget_gui ${selectiontreewidget_gui_SRCS}) -target_link_libraries(selectiontreewidget_gui +target_link_libraries( + selectiontreewidget_gui KPim6::AkonadiCore KPim6::AkonadiPrivate KPim6::MailCommon @@ -20,9 +26,17 @@ target_link_libraries(selectiontreewidget_gui KF6::I18n ) -set(showarchivestructuredialog_gui_SRCS showarchivestructuredialog_gui.cpp ../dialog/showarchivestructuredialog.cpp ../pimdataexportgui_debug.cpp) -add_executable(showarchivestructuredialog_gui ${showarchivestructuredialog_gui_SRCS}) -target_link_libraries(showarchivestructuredialog_gui +set(showarchivestructuredialog_gui_SRCS + showarchivestructuredialog_gui.cpp + ../dialog/showarchivestructuredialog.cpp + ../pimdataexportgui_debug.cpp +) +add_executable( + showarchivestructuredialog_gui + ${showarchivestructuredialog_gui_SRCS} +) +target_link_libraries( + showarchivestructuredialog_gui KPim6::AkonadiCore KPim6::AkonadiPrivate KPim6::MailCommon diff --git a/readme-build-ftime.txt b/readme-build-ftime.txt index 833cfa00..b931a180 100644 --- a/readme-build-ftime.txt +++ b/readme-build-ftime.txt @@ -23,4 +23,3 @@ ClangBuildAnalyzer --analyze build-ftime.txt > analyze-build-ftime.txt see https://aras-p.info/blog/2019/09/28/Clang-Build-Analyzer/ -
