[pim/grantlee-editor] /: Add pre-commit CI support

Laurent Montel null at kde.org
Tue Jun 10 06:02:44 BST 2025


Git commit bf9956e3ae517559c6efaa752202cf0b6e9c2fcf by Laurent Montel.
Committed on 10/06/2025 at 05:02.
Pushed by mlaurent into branch 'master'.

Add pre-commit CI support

A  +95   -0    .clang-format-pre-commit
M  +1    -3    .gitlab-ci.yml
A  +59   -0    .pre-commit-config.yaml
M  +56   -26   CMakeLists.txt
M  +1    -1    LICENSES/GPL-2.0-or-later.txt
A  +19   -0    LICENSES/MIT.txt
M  +31   -25   contactprintthemeeditor/CMakeLists.txt
M  +0    -1    contactprintthemeeditor/contactprintthemeeditor.qrc
M  +0    -1    contactprintthemeeditor/contactprintthemeeditorui.rc
M  +40   -34   contactthemeeditor/CMakeLists.txt
M  +0    -1    contactthemeeditor/contactthemeeditor.qrc
M  +0    -1    contactthemeeditor/contactthemeeditorui.rc
M  +1    -1    doc/contactthemeeditor/index.docbook
M  +1    -1    doc/headerthemeeditor/index.docbook
M  +26   -15   grantleethemeeditor/CMakeLists.txt
M  +0    -1    grantleethemeeditor/settings/globalsettings_base.kcfgc
M  +0    -1    grantleethemeeditor/settings/grantleethemeeditor.kcfg
M  +31   -25   headerthemeeditor/CMakeLists.txt
M  +0    -1    headerthemeeditor/headerthemeeditor.qrc
M  +0    -1    headerthemeeditor/headerthemeeditorui.rc
M  +0    -1    readme-build-ftime.txt

https://invent.kde.org/pim/grantlee-editor/-/commit/bf9956e3ae517559c6efaa752202cf0b6e9c2fcf

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 <cullmann at kde.org>
+# SPDX-FileCopyrightText: 2019 Gernot Gebhard <gebhard at absint.com>
+#
+# 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 6f361bdc..c66a06fe 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,11 +6,9 @@ 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/cppcheck.yml
-      - /gitlab-templates/clang-format.yml
       - /gitlab-templates/windows-qt6.yml
       - /gitlab-templates/craft-windows-x86-64-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..0fb98c45
--- /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 567c8464..17708869 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,17 +8,28 @@ find_package(ECM ${KF_MIN_VERSION} CONFIG REQUIRED)
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
 include(ECMInstallIcons)
 
-
 include(ECMSetupVersion)
 include(ECMAddTests)
 
 include(GenerateExportHeader)
 include(ECMGenerateHeaders)
 
-include(KDEGitCommitHooks)
-include(KDEClangFormat)
 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.c)
-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(CheckFunctionExists)
 
 include(KDEInstallDirs)
@@ -30,19 +41,19 @@ include(ECMDeprecationSettings)
 include(ECMFeatureSummary)
 
 include(ECMCheckOutboundLicense)
-file(GLOB_RECURSE ALL_SOURCE_FILES
-headerthemeeditor/*.cpp
-headerthemeeditor/*.h
-contactthemeeditor/*.cpp
-contactthemeeditor/*.h
-grantleethemeeditor/*.cpp
-grantleethemeeditor/*.h
-contactprintthemeeditor/*.cpp
-contactprintthemeeditor/*.h
+file(
+    GLOB_RECURSE ALL_SOURCE_FILES
+    headerthemeeditor/*.cpp
+    headerthemeeditor/*.h
+    contactthemeeditor/*.cpp
+    contactthemeeditor/*.h
+    grantleethemeeditor/*.cpp
+    grantleethemeeditor/*.h
+    contactprintthemeeditor/*.cpp
+    contactprintthemeeditor/*.h
 )
 ecm_check_outbound_license(LICENSES GPL-2.0-only  FILES ${ALL_SOURCE_FILES})
 
-
 # Do NOT add quote
 set(KDEPIM_DEV_VERSION alpha)
 
@@ -51,7 +62,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")
@@ -64,7 +77,12 @@ set(KIMAP_LIB_VERSION "6.4.40")
 set(PIMCOMMON_LIB_VERSION "6.4.40")
 set(KPIM_MIME_VERSION "6.4.40")
 set(KTEXTADDONS_MIN_VERSION "1.6.0")
-find_package(Qt6 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets WebEngineWidgets)
+find_package(
+    Qt6
+    ${QT_REQUIRED_VERSION}
+    CONFIG
+    REQUIRED Widgets WebEngineWidgets
+)
 
 # Find KF6 package
 find_package(KF6Crash ${KF_MIN_VERSION} REQUIRED)
@@ -74,13 +92,18 @@ find_package(KF6Archive ${KF_MIN_VERSION} CONFIG REQUIRED)
 find_package(KPim6PimCommon ${PIMCOMMON_LIB_VERSION} CONFIG REQUIRED)
 find_package(KPim6MessageViewer ${MESSAGELIB_LIB_VERSION} CONFIG REQUIRED)
 find_package(KPim6GrantleeTheme ${LIBGRANTLEETHEME_LIB_VERSION} CONFIG REQUIRED)
-find_package(KPim6AkonadiContactWidgets ${AKONADI_CONTACT_VERSION} CONFIG REQUIRED)
+find_package(
+    KPim6AkonadiContactWidgets
+    ${AKONADI_CONTACT_VERSION}
+    CONFIG
+    REQUIRED
+)
 find_package(KPim6IMAP ${KIMAP_LIB_VERSION} CONFIG REQUIRED)
 
 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
 )
 
 # Find KdepimLibs Package
@@ -89,16 +112,21 @@ find_package(KPim6Mime ${KPIM_MIME_VERSION} CONFIG REQUIRED)
 find_package(KF6SyntaxHighlighting ${KF_MIN_VERSION} CONFIG REQUIRED)
 find_package(KF6TextCustomEditor ${KTEXTADDONS_MIN_VERSION} CONFIG REQUIRED)
 
-
 include_directories(${grantlee-editor_SOURCE_DIR} ${grantlee-editor_BINARY_DIR})
 
 add_definitions(-DQT_NO_CONTEXTLESS_CONNECT)
 ecm_set_disabled_deprecation_versions(QT 6.9.0 KF 6.15.0)
 
-
-
-configure_file(grantleeeditor-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/grantleeeditor-version.h @ONLY)
-option(USE_UNITY_CMAKE_SUPPORT "Use UNITY cmake support (speedup compile time)" OFF)
+configure_file(
+    grantleeeditor-version.h.in
+    ${CMAKE_CURRENT_BINARY_DIR}/grantleeeditor-version.h
+    @ONLY
+)
+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)
@@ -115,7 +143,9 @@ ecm_qt_install_logging_categories(
         DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
 )
 
-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()
 
 if(KF6DocTools_FOUND)
     kdoctools_install(po)
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/contactprintthemeeditor/CMakeLists.txt b/contactprintthemeeditor/CMakeLists.txt
index 6f1bcd02..4ae3e472 100644
--- a/contactprintthemeeditor/CMakeLists.txt
+++ b/contactprintthemeeditor/CMakeLists.txt
@@ -1,27 +1,29 @@
 add_executable(contactprintthemeeditor)
-target_sources(contactprintthemeeditor PRIVATE
-    main.cpp
-    defaultcompletion.cpp
-    editorpage.cpp
-    contactprintthemeconfiguredialog.cpp
-    themedefaulttemplate.cpp
-    themeeditormainwindow.cpp
-    themeeditorpage.cpp
-    contactprintthemeeditorutil.cpp
-    themeeditorwidget.cpp
-    themetemplatewidget.cpp
-    contactprintthemepreview.cpp
-    defaultcompletion.h
-    editorpage.h
-    contactprintthemeconfiguredialog.h
-    themedefaulttemplate.h
-    themeeditormainwindow.h
-    themeeditorpage.h
-    contactprintthemeeditorutil.h
-    themeeditorwidget.h
-    themetemplatewidget.h
-    contactprintthemepreview.h
-    contactprintthemeeditor.qrc
+target_sources(
+    contactprintthemeeditor
+    PRIVATE
+        main.cpp
+        defaultcompletion.cpp
+        editorpage.cpp
+        contactprintthemeconfiguredialog.cpp
+        themedefaulttemplate.cpp
+        themeeditormainwindow.cpp
+        themeeditorpage.cpp
+        contactprintthemeeditorutil.cpp
+        themeeditorwidget.cpp
+        themetemplatewidget.cpp
+        contactprintthemepreview.cpp
+        defaultcompletion.h
+        editorpage.h
+        contactprintthemeconfiguredialog.h
+        themedefaulttemplate.h
+        themeeditormainwindow.h
+        themeeditorpage.h
+        contactprintthemeeditorutil.h
+        themeeditorwidget.h
+        themetemplatewidget.h
+        contactprintthemepreview.h
+        contactprintthemeeditor.qrc
 )
 
 ecm_qt_declare_logging_category(contactprintthemeeditor HEADER contactprintthemeeditor_debug.h IDENTIFIER CONTACTPRINTTHEMEEDITOR_LOG CATEGORY_NAME org.kde.pim.contactprintthemeeditor
@@ -33,7 +35,8 @@ if(COMPILE_WITH_UNITY_CMAKE_SUPPORT)
     set_target_properties(contactprintthemeeditor PROPERTIES UNITY_BUILD ON)
 endif()
 
-target_link_libraries(contactprintthemeeditor
+target_link_libraries(
+    contactprintthemeeditor
     KF6::DBusAddons
     KPim6::AkonadiContactWidgets
     KPim6::PimCommon
@@ -46,4 +49,7 @@ target_link_libraries(contactprintthemeeditor
 
 install(TARGETS contactprintthemeeditor ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
 
-install(PROGRAMS org.kde.contactprintthemeeditor.desktop DESTINATION ${KDE_INSTALL_APPDIR})
+install(
+    PROGRAMS org.kde.contactprintthemeeditor.desktop
+    DESTINATION ${KDE_INSTALL_APPDIR}
+)
diff --git a/contactprintthemeeditor/contactprintthemeeditor.qrc b/contactprintthemeeditor/contactprintthemeeditor.qrc
index e9863741..8e4f72e4 100644
--- a/contactprintthemeeditor/contactprintthemeeditor.qrc
+++ b/contactprintthemeeditor/contactprintthemeeditor.qrc
@@ -4,4 +4,3 @@
         <file>contactprintthemeeditorui.rc</file>
     </qresource>
 </RCC>
-
diff --git a/contactprintthemeeditor/contactprintthemeeditorui.rc b/contactprintthemeeditor/contactprintthemeeditorui.rc
index c6c74d4f..1cb914e3 100644
--- a/contactprintthemeeditor/contactprintthemeeditorui.rc
+++ b/contactprintthemeeditor/contactprintthemeeditorui.rc
@@ -27,4 +27,3 @@
    <Action name="update_view" />
  </ToolBar>
 </gui>
-
diff --git a/contactthemeeditor/CMakeLists.txt b/contactthemeeditor/CMakeLists.txt
index 6825c6be..eb55d601 100644
--- a/contactthemeeditor/CMakeLists.txt
+++ b/contactthemeeditor/CMakeLists.txt
@@ -1,29 +1,31 @@
 add_executable(contactthemeeditor)
-target_sources(contactthemeeditor PRIVATE
-    main.cpp
-    defaultcompletion.cpp
-    contactdefaulttemplate.cpp
-    contacteditorwidget.cpp
-    contacttemplatewidget.cpp
-    contacteditormainwindow.cpp
-    previewwidget.cpp
-    editorpage.cpp
-    contacteditorpage.cpp
-    contactconfigurationdialog.cpp
-    contacteditorutil.cpp
-    contactpreviewwidget.cpp
-    defaultcompletion.h
-    contactdefaulttemplate.h
-    contacteditorwidget.h
-    contacttemplatewidget.h
-    contacteditormainwindow.h
-    previewwidget.h
-    editorpage.h
-    contacteditorpage.h
-    contactconfigurationdialog.h
-    contacteditorutil.h
-    contactpreviewwidget.h
-    contactthemeeditor.qrc
+target_sources(
+    contactthemeeditor
+    PRIVATE
+        main.cpp
+        defaultcompletion.cpp
+        contactdefaulttemplate.cpp
+        contacteditorwidget.cpp
+        contacttemplatewidget.cpp
+        contacteditormainwindow.cpp
+        previewwidget.cpp
+        editorpage.cpp
+        contacteditorpage.cpp
+        contactconfigurationdialog.cpp
+        contacteditorutil.cpp
+        contactpreviewwidget.cpp
+        defaultcompletion.h
+        contactdefaulttemplate.h
+        contacteditorwidget.h
+        contacttemplatewidget.h
+        contacteditormainwindow.h
+        previewwidget.h
+        editorpage.h
+        contacteditorpage.h
+        contactconfigurationdialog.h
+        contacteditorutil.h
+        contactpreviewwidget.h
+        contactthemeeditor.qrc
 )
 ecm_qt_declare_logging_category(contactthemeeditor HEADER contactthemeeditor_debug.h IDENTIFIER CONTACTTHEMEEDITOR_LOG CATEGORY_NAME org.kde.pim.contactthemeeditor
         DESCRIPTION "grantleeeditor (contactthemeeditor)"
@@ -31,15 +33,16 @@ ecm_qt_declare_logging_category(contactthemeeditor HEADER contactthemeeditor_deb
         EXPORT GRANTLEEEDITOR
 )
 
-target_link_libraries(contactthemeeditor
+target_link_libraries(
+    contactthemeeditor
     PRIVATE
-    KF6::DBusAddons
-    KPim6::AkonadiContactWidgets
-    KPim6::PimCommon
-    grantleethemeeditor
-    KF6::I18n
-    KF6::Crash
-    KF6::XmlGui
+        KF6::DBusAddons
+        KPim6::AkonadiContactWidgets
+        KPim6::PimCommon
+        grantleethemeeditor
+        KF6::I18n
+        KF6::Crash
+        KF6::XmlGui
 )
 if(COMPILE_WITH_UNITY_CMAKE_SUPPORT)
     set_target_properties(contactthemeeditor PROPERTIES UNITY_BUILD ON)
@@ -47,4 +50,7 @@ endif()
 
 install(TARGETS contactthemeeditor ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
 
-install(PROGRAMS org.kde.contactthemeeditor.desktop DESTINATION ${KDE_INSTALL_APPDIR})
+install(
+    PROGRAMS org.kde.contactthemeeditor.desktop
+    DESTINATION ${KDE_INSTALL_APPDIR}
+)
diff --git a/contactthemeeditor/contactthemeeditor.qrc b/contactthemeeditor/contactthemeeditor.qrc
index 9775e4b5..be7bcea0 100644
--- a/contactthemeeditor/contactthemeeditor.qrc
+++ b/contactthemeeditor/contactthemeeditor.qrc
@@ -4,4 +4,3 @@
         <file>contactthemeeditorui.rc</file>
     </qresource>
 </RCC>
-
diff --git a/contactthemeeditor/contactthemeeditorui.rc b/contactthemeeditor/contactthemeeditorui.rc
index ef235721..3d695215 100644
--- a/contactthemeeditor/contactthemeeditorui.rc
+++ b/contactthemeeditor/contactthemeeditorui.rc
@@ -27,4 +27,3 @@
    <Action name="update_view" />
  </ToolBar>
 </gui>
-
diff --git a/doc/contactthemeeditor/index.docbook b/doc/contactthemeeditor/index.docbook
index 3c1ab4fb..8958a51e 100644
--- a/doc/contactthemeeditor/index.docbook
+++ b/doc/contactthemeeditor/index.docbook
@@ -5,7 +5,7 @@
        CVS -->
   <!ENTITY i18n-kapplication "<application>Contact Theme Editor</application>">
   <!ENTITY % addindex "IGNORE">
-  <!ENTITY % English "INCLUDE"> 
+  <!ENTITY % English "INCLUDE">
 ]>
 
 <article id="contactthemeeditor" lang="&language;">
diff --git a/doc/headerthemeeditor/index.docbook b/doc/headerthemeeditor/index.docbook
index c6f8a0c6..fe0f1f4d 100644
--- a/doc/headerthemeeditor/index.docbook
+++ b/doc/headerthemeeditor/index.docbook
@@ -5,7 +5,7 @@
        CVS -->
   <!ENTITY i18n-kapplication "<application>Header Theme Editor</application>">
   <!ENTITY % addindex "IGNORE">
-  <!ENTITY % English "INCLUDE"> 
+  <!ENTITY % English "INCLUDE">
 ]>
 
 <article id="headerthemeeditor" lang="&language;">
diff --git a/grantleethemeeditor/CMakeLists.txt b/grantleethemeeditor/CMakeLists.txt
index 70f68be1..74e16276 100644
--- a/grantleethemeeditor/CMakeLists.txt
+++ b/grantleethemeeditor/CMakeLists.txt
@@ -1,7 +1,6 @@
 add_definitions(-DTRANSLATION_DOMAIN=\"libgrantleethemeeditor\")
 
-
-set(libgrantleethemeeditor_SRCS 
+set(libgrantleethemeeditor_SRCS
     newthemedialog.cpp
     themeeditortabwidget.cpp
     managethemes.cpp
@@ -38,7 +37,6 @@ ecm_qt_declare_logging_category(libgrantleethemeeditor_SRCS HEADER grantleetheme
         EXPORT GRANTLEEEDITOR
 )
 
-
 add_library(grantleethemeeditor ${libgrantleethemeeditor_SRCS})
 if(COMPILE_WITH_UNITY_CMAKE_SUPPORT)
     set_target_properties(grantleethemeeditor PROPERTIES UNITY_BUILD ON)
@@ -46,20 +44,33 @@ endif()
 
 generate_export_header(grantleethemeeditor BASE_NAME grantleethemeeditor)
 
-target_include_directories(grantleethemeeditor PUBLIC "$<BUILD_INTERFACE:${grantleeditor_SOURCE_DIR};${grantleethemeeditor_SOURCE_DIR};${grantleethemeeditor_BINAY_DIR}>")
-
-target_link_libraries(grantleethemeeditor
+target_include_directories(
+    grantleethemeeditor
     PUBLIC
-    KF6::Archive
+        "$<BUILD_INTERFACE:${grantleeditor_SOURCE_DIR};${grantleethemeeditor_SOURCE_DIR};${grantleethemeeditor_BINAY_DIR}>"
+)
+
+target_link_libraries(
+    grantleethemeeditor
+    PUBLIC KF6::Archive
     PRIVATE
-    KF6::KIOWidgets
-    KPim6::PimCommon
-    KF6::I18n
-    KF6::SyntaxHighlighting
-    KF6::TextCustomEditor
+        KF6::KIOWidgets
+        KPim6::PimCommon
+        KF6::I18n
+        KF6::SyntaxHighlighting
+        KF6::TextCustomEditor
 )
 
-install(FILES settings/grantleethemeeditor.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
+install(
+    FILES settings/grantleethemeeditor.kcfg
+    DESTINATION ${KDE_INSTALL_KCFGDIR}
+)
 
-set_target_properties(grantleethemeeditor PROPERTIES VERSION ${KDEPIM_LIB_VERSION} SOVERSION ${KDEPIM_LIB_SOVERSION})
-install(TARGETS grantleethemeeditor ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}  LIBRARY NAMELINK_SKIP)
+set_target_properties(
+    grantleethemeeditor
+    PROPERTIES VERSION ${KDEPIM_LIB_VERSION} SOVERSION ${KDEPIM_LIB_SOVERSION}
+)
+install(
+    TARGETS grantleethemeeditor ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}
+    LIBRARY NAMELINK_SKIP
+)
diff --git a/grantleethemeeditor/settings/globalsettings_base.kcfgc b/grantleethemeeditor/settings/globalsettings_base.kcfgc
index a3926ea4..acf4c04b 100644
--- a/grantleethemeeditor/settings/globalsettings_base.kcfgc
+++ b/grantleethemeeditor/settings/globalsettings_base.kcfgc
@@ -9,4 +9,3 @@ SetUserTexts=true
 IncludeFiles=grantleethemeeditor_export.h
 TranslationDomain=libgrantleethemeeditor
 TranslationSystem=kde
-
diff --git a/grantleethemeeditor/settings/grantleethemeeditor.kcfg b/grantleethemeeditor/settings/grantleethemeeditor.kcfg
index 8a6accd8..52ed1bd3 100644
--- a/grantleethemeeditor/settings/grantleethemeeditor.kcfg
+++ b/grantleethemeeditor/settings/grantleethemeeditor.kcfg
@@ -19,4 +19,3 @@ xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 http://www.kde.org/sta
   </group>
 
 </kcfg>
-
diff --git a/headerthemeeditor/CMakeLists.txt b/headerthemeeditor/CMakeLists.txt
index f308784f..e92f90ec 100644
--- a/headerthemeeditor/CMakeLists.txt
+++ b/headerthemeeditor/CMakeLists.txt
@@ -1,27 +1,29 @@
 add_executable(headerthemeeditor ${headerthemeeditor_SRCS})
-target_sources(headerthemeeditor PRIVATE
-    main.cpp
-    themeeditormainwindow.cpp
-    themeeditorpage.cpp
-    previewwidget.cpp
-    editorpage.cpp
-    themetemplatewidget.cpp
-    themedefaulttemplate.cpp
-    defaultcompletion.cpp
-    themeconfiguredialog.cpp
-    themeeditorutil.cpp
-    themeeditorwidget.cpp
-    headerthemeeditor.qrc
-    themeeditormainwindow.h
-    themeeditorpage.h
-    previewwidget.h
-    editorpage.h
-    themetemplatewidget.h
-    themedefaulttemplate.h
-    defaultcompletion.h
-    themeconfiguredialog.h
-    themeeditorutil.h
-    themeeditorwidget.h
+target_sources(
+    headerthemeeditor
+    PRIVATE
+        main.cpp
+        themeeditormainwindow.cpp
+        themeeditorpage.cpp
+        previewwidget.cpp
+        editorpage.cpp
+        themetemplatewidget.cpp
+        themedefaulttemplate.cpp
+        defaultcompletion.cpp
+        themeconfiguredialog.cpp
+        themeeditorutil.cpp
+        themeeditorwidget.cpp
+        headerthemeeditor.qrc
+        themeeditormainwindow.h
+        themeeditorpage.h
+        previewwidget.h
+        editorpage.h
+        themetemplatewidget.h
+        themedefaulttemplate.h
+        defaultcompletion.h
+        themeconfiguredialog.h
+        themeeditorutil.h
+        themeeditorwidget.h
 )
 
 ecm_qt_declare_logging_category(headerthemeeditor HEADER headerthemeeditor_debug.h IDENTIFIER HEADERTHEMEEDITOR_LOG CATEGORY_NAME org.kde.pim.headerthemeeditor
@@ -34,7 +36,8 @@ if(COMPILE_WITH_UNITY_CMAKE_SUPPORT)
     set_target_properties(headerthemeeditor PROPERTIES UNITY_BUILD ON)
 endif()
 
-target_link_libraries(headerthemeeditor
+target_link_libraries(
+    headerthemeeditor
     KPim6::Mime
     KPim6::PimCommon
     KPim6::MessageViewer
@@ -48,4 +51,7 @@ target_link_libraries(headerthemeeditor
 
 install(TARGETS headerthemeeditor ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
 
-install(PROGRAMS org.kde.headerthemeeditor.desktop DESTINATION ${KDE_INSTALL_APPDIR})
+install(
+    PROGRAMS org.kde.headerthemeeditor.desktop
+    DESTINATION ${KDE_INSTALL_APPDIR}
+)
diff --git a/headerthemeeditor/headerthemeeditor.qrc b/headerthemeeditor/headerthemeeditor.qrc
index 33ff4f50..06ea23e4 100644
--- a/headerthemeeditor/headerthemeeditor.qrc
+++ b/headerthemeeditor/headerthemeeditor.qrc
@@ -4,4 +4,3 @@
         <file>headerthemeeditorui.rc</file>
     </qresource>
 </RCC>
-
diff --git a/headerthemeeditor/headerthemeeditorui.rc b/headerthemeeditor/headerthemeeditorui.rc
index 237de75a..4ce23c74 100644
--- a/headerthemeeditor/headerthemeeditorui.rc
+++ b/headerthemeeditor/headerthemeeditorui.rc
@@ -31,4 +31,3 @@
  </ToolBar>
 
 </gui>
-
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/
-


More information about the kde-doc-english mailing list