Skip to content

Commit 266c39b

Browse files
author
Allen Winter
committed
Merge branch 'kdreports-2.2'
2 parents 7823017 + 604be97 commit 266c39b

27 files changed

+3462
-593
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
ci:
44
autoupdate_schedule: monthly
55

6-
exclude: ^(cmake/ECM/|cmake/KDAB/)
6+
exclude: ^(cmake/ECM/|cmake/KDAB/|docs/api/doxygen-awesome.css)
77
repos:
88
- repo: https://github.com/pre-commit/pre-commit-hooks
99
rev: v4.5.0
@@ -21,11 +21,11 @@ repos:
2121
- id: destroyed-symlinks
2222
- id: check-executables-have-shebangs
2323
- repo: https://github.com/pre-commit/mirrors-clang-format
24-
rev: v17.0.6
24+
rev: v18.1.2
2525
hooks:
2626
- id: clang-format
2727
- repo: https://github.com/PyCQA/pylint
28-
rev: v3.0.3
28+
rev: v3.1.0
2929
hooks:
3030
- id: pylint
3131
exclude: ^(.cmake-format.py|conan/conanfile.py)
@@ -53,6 +53,6 @@ repos:
5353
language: ruby
5454
files: \.(md|mdown|markdown)$
5555
- repo: https://github.com/fsfe/reuse-tool
56-
rev: v2.1.0
56+
rev: v3.0.1
5757
hooks:
5858
- id: reuse

.reuse/dep5

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,16 @@ Copyright: Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
1919
License: MIT
2020

2121
#misc config files
22-
Files: .pre-commit-config.yaml .codespellrc .krazy .cmake-format.py .clang-format .clang-tidy .clazy .gitignore .mdlrc .mdlrc.rb .pep8 .pylintrc appveyor.yml docs/api/Doxyfile.cmake distro/*
22+
Files: .pre-commit-config.yaml .codespellrc .krazy .cmake-format.py .clang-format .clang-tidy .clazy .gitignore .mdlrc .mdlrc.rb .pep8 .pylintrc docs/api/Doxyfile.cmake distro/*
2323
Copyright: Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
2424
License: BSD-3-Clause
2525

2626
#3rdparty
2727
Files: cmake/ECM/modules/*
2828
Copyright: The KDE Project
2929
License: BSD-3-Clause
30+
31+
# doxygen awesome
32+
Files: docs/api/doxygen-awesome.css
33+
Copyright: 2021 - 2023 jothepro
34+
License: MIT

CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
113113
endif()
114114

115115
if(${PROJECT_NAME}_QT6)
116-
set(Qt_VERSION_MAJOR 6)
116+
set(QT_VERSION_MAJOR 6)
117117
set(QT_MIN_VERSION "6.0.0")
118118
find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Widgets PrintSupport Xml)
119119
list(
@@ -126,7 +126,7 @@ if(${PROJECT_NAME}_QT6)
126126
)
127127
set(${PROJECT_NAME}_LIBRARY_QTID "-qt6")
128128
else()
129-
set(Qt_VERSION_MAJOR 5)
129+
set(QT_VERSION_MAJOR 5)
130130
set(QT_MIN_VERSION 5.9.0)
131131
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Widgets PrintSupport Xml)
132132
list(
@@ -243,7 +243,7 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
243243

244244
# Generate .pri file for qmake users (except when using the VS generator)
245245
if(NOT CMAKE_CONFIGURATION_TYPES)
246-
if(Qt_VERSION_MAJOR EQUAL 5 OR (Qt_VERSION_MAJOR EQUAL 6 AND Qt6Core_VERSION VERSION_GREATER "6.2"))
246+
if(QT_VERSION_MAJOR EQUAL 5 OR (QT_VERSION_MAJOR EQUAL 6 AND Qt6Core_VERSION VERSION_GREATER "6.2"))
247247
include(ECMGeneratePriFile) #not available for Qt6.2 or lower
248248
set(PROJECT_VERSION_STRING ${${PROJECT_NAME}_VERSION})
249249
ecm_generate_pri_file(
@@ -274,10 +274,10 @@ endif()
274274
add_subdirectory(src)
275275

276276
if(${PROJECT_NAME}_PYTHON_BINDINGS)
277-
if(Qt_VERSION_MAJOR EQUAL 5 AND Qt5Core_VERSION VERSION_LESS 5.12)
277+
if(QT_VERSION_MAJOR EQUAL 5 AND Qt5Core_VERSION VERSION_LESS 5.12)
278278
message(WARNING "** Disabling Python Bindings. Qt version is too old and unsupported.")
279279
set(${PROJECT_NAME}_PYTHON_BINDINGS OFF)
280-
elseif(Qt_VERSION_MAJOR EQUAL 6 AND Qt6Core_VERSION VERSION_LESS 6.2)
280+
elseif(QT_VERSION_MAJOR EQUAL 6 AND Qt6Core_VERSION VERSION_LESS 6.2)
281281
message(WARNING "** Disabling Python Bindings. shiboken6 is too old and unsupported")
282282
set(${PROJECT_NAME}_PYTHON_BINDINGS OFF)
283283
elseif(CMAKE_BUILD_TYPE MATCHES "^[Dd]eb" OR ${PROJECT_NAME}_STATIC)
@@ -290,12 +290,12 @@ endif()
290290

291291
if(${PROJECT_NAME}_TESTS OR ${PROJECT_NAME}_EXAMPLES)
292292
if(NOT EMSCRIPTEN)
293-
find_package(Qt${Qt_VERSION_MAJOR}Sql)
293+
find_package(Qt${QT_VERSION_MAJOR}Sql)
294294
endif()
295295
endif()
296296

297297
if(${PROJECT_NAME}_TESTS)
298-
find_package(Qt${Qt_VERSION_MAJOR}Test REQUIRED)
298+
find_package(Qt${QT_VERSION_MAJOR}Test REQUIRED)
299299
add_subdirectory(unittests)
300300
endif()
301301

appveyor.yml

Lines changed: 0 additions & 95 deletions
This file was deleted.

cmake/ECM/modules/ECMGenerateHeaders.cmake

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ Example usage (with ``PREFIX``):
118118
Since pre-1.0.0.
119119
#]=======================================================================]
120120

121-
include(CMakeParseArguments)
122-
123121
function(ECM_GENERATE_HEADERS camelcase_forwarding_headers_var)
124122
set(options)
125123
set(oneValueArgs ORIGINAL HEADER_EXTENSION OUTPUT_DIR PREFIX REQUIRED_HEADERS COMMON_HEADER RELATIVE)
@@ -178,7 +176,8 @@ function(ECM_GENERATE_HEADERS camelcase_forwarding_headers_var)
178176
endif()
179177

180178
set(_actualheader "${CMAKE_CURRENT_SOURCE_DIR}/${EGH_RELATIVE}${originalbasename}.${EGH_HEADER_EXTENSION}")
181-
if (NOT EXISTS ${_actualheader})
179+
get_source_file_property(_generated "${_actualheader}" GENERATED)
180+
if (NOT _generated AND NOT EXISTS ${_actualheader})
182181
message(FATAL_ERROR "Could not find \"${_actualheader}\"")
183182
endif()
184183

cmake/ECM/modules/ECMSetupVersion.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function(ecm_setup_version _version)
142142
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.0*([0-9]+).*" "\\1" _patch "${_version}")
143143
endif()
144144

145-
if(NOT ESV_SOVERSION)
145+
if(NOT DEFINED ESV_SOVERSION) # use DEFINED, so "0" as valid SO version is not evaluated to FALSE
146146
set(ESV_SOVERSION ${_major})
147147
endif()
148148

cmake/ECM/modules/QtVersionOption.cmake

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ that is, if the major Qt version has not yet been determined otherwise
1212
This module is typically included by other modules requiring knowledge
1313
about the major Qt version.
1414
15+
If the ECM version passed to find_package was at least 5.240.0 Qt6 is picked by default.
16+
Otherwise Qt5 is picked.
17+
1518
``QT_MAJOR_VERSION`` is defined to either be "5" or "6".
1619
1720
Since 5.82.0.
@@ -26,7 +29,11 @@ if (TARGET Qt5::Core)
2629
elseif (TARGET Qt6::Core)
2730
set(QT_MAJOR_VERSION 6)
2831
else()
29-
option(BUILD_WITH_QT6 "Build against Qt 6" OFF)
32+
if (ECM_GLOBAL_FIND_VERSION VERSION_GREATER_EQUAL 5.240)
33+
option(BUILD_WITH_QT6 "Build against Qt 6" ON)
34+
else()
35+
option(BUILD_WITH_QT6 "Build against Qt 6" OFF)
36+
endif()
3037

3138
if (BUILD_WITH_QT6)
3239
set(QT_MAJOR_VERSION 6)

cmake/KDAB/modules/FindKDChart.cmake

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,38 @@
55
# KDChart_LIBRARIES - Path to KDChart libraries.
66
# KDChart_INCLUDE_DIR - Path to the KDChart include directory.
77
#
8-
# SPDX-FileCopyrightText: 2015-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
8+
# SPDX-FileCopyrightText: 2015 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
99
#
1010
# SPDX-License-Identifier: BSD-3-Clause
1111
#
1212

1313
include(FindPackageHandleStandardArgs)
1414

15-
find_library(KDChart_LIBRARIES
16-
NAMES KDChart kdchart kdchart2 kdchartd2 NAMES_PER_DIR
15+
find_library(
16+
KDChart_LIBRARIES
17+
NAMES KDChart
18+
kdchart
19+
kdchart2
20+
kdchartd2
21+
NAMES_PER_DIR
1722
HINTS ${KDChart_DIR} ENV KDChart_DIR
18-
PATH_SUFFIXES lib)
23+
PATH_SUFFIXES lib
24+
)
1925

20-
find_path(KDChart_INCLUDE_DIR
26+
find_path(
27+
KDChart_INCLUDE_DIR
2128
NAMES KDChartGlobal.h
2229
HINTS ${KDChart_DIR} ENV KDChart_DIR
23-
PATH_SUFFIXES include include/KDChart)
30+
PATH_SUFFIXES include include/KDChart
31+
)
2432

2533
mark_as_advanced(KDChart_LIBRARIES KDChart_INCLUDE_DIR)
2634

2735
find_package_handle_standard_args(KDChart DEFAULT_MSG KDChart_LIBRARIES KDChart_INCLUDE_DIR)
2836

2937
if(KDChart_FOUND)
3038
add_library(KDChart UNKNOWN IMPORTED)
31-
set_target_properties(KDChart PROPERTIES
32-
IMPORTED_LOCATION ${KDChart_LIBRARIES}
33-
INTERFACE_INCLUDE_DIRECTORIES ${KDChart_INCLUDE_DIR})
39+
set_target_properties(
40+
KDChart PROPERTIES IMPORTED_LOCATION ${KDChart_LIBRARIES} INTERFACE_INCLUDE_DIRECTORIES ${KDChart_INCLUDE_DIR}
41+
)
3442
endif()

0 commit comments

Comments
 (0)