From 62225828cf4f1756d0d0e07d2be53ee2c502a49c Mon Sep 17 00:00:00 2001 From: Sergio Martins Date: Mon, 8 Apr 2024 16:23:01 +0100 Subject: [PATCH 1/8] ci: Add valgrind suppression Some race only repro on CI's ubuntu and only sometimes. ==5928== HEAP SUMMARY: ==5928== in use at exit: 30,542 bytes in 66 blocks ==5928== total heap usage: 26,167 allocs, 26,101 frees, 17,350,619 bytes allocated ==5928== ==5928== 400 bytes in 1 blocks are possibly lost in loss record 39 of 46 ==5928== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==5928== by 0x40147D9: calloc (rtld-malloc.h:44) ==5928== by 0x40147D9: allocate_dtv (dl-tls.c:375) ==5928== by 0x40147D9: _dl_allocate_tls (dl-tls.c:634) ==5928== by 0x68687B4: allocate_stack (allocatestack.c:430) ==5928== by 0x68687B4: pthread_create@@GLIBC_2.34 (pthread_create.c:647) ==5928== by 0x617168C: QThread::start(QThread::Priority) (in /home/runner/work/KDDockWidgets/Qt/6.6.0/gcc_64/lib/libQt6Core.so.6.6.0) ==5928== by 0x61752DD: QThreadPoolPrivate::startThread(QRunnable*) (in /home/runner/work/KDDockWidgets/Qt/6.6.0/gcc_64/lib/libQt6Core.so.6.6.0) ==5928== by 0x61763C8: QThreadPoolPrivate::tryStart(QRunnable*) (in /home/runner/work/KDDockWidgets/Qt/6.6.0/gcc_64/lib/libQt6Core.so.6.6.0) ==5928== by 0x61767FE: QThreadPool::start(QRunnable*, int) (in /home/runner/work/KDDockWidgets/Qt/6.6.0/gcc_64/lib/libQt6Core.so.6.6.0) ==5928== by 0x5B3A10E: ??? (in /home/runner/work/KDDockWidgets/Qt/6.6.0/gcc_64/lib/libQt6Gui.so.6.6.0) ==5928== by 0x5723482: ??? (in /home/runner/work/KDDockWidgets/Qt/6.6.0/gcc_64/lib/libQt6Gui.so.6.6.0) ==5928== by 0x56F4268: ??? (in /home/runner/work/KDDockWidgets/Qt/6.6.0/gcc_64/lib/libQt6Gui.so.6.6.0) ==5928== by 0x56F8027: ??? (in /home/runner/work/KDDockWidgets/Qt/6.6.0/gcc_64/lib/libQt6Gui.so.6.6.0) ==5928== by 0x573152F: QRasterPaintEngine::stroke(QVectorPath const&, QPen const&) (in /home/runner/work/KDDockWidgets/Qt/6.6.0/gcc_64/lib/libQt6Gui.so.6.6.0) ==5928== --- valgrind.sup | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/valgrind.sup b/valgrind.sup index d9de2b805..695202fb9 100644 --- a/valgrind.sup +++ b/valgrind.sup @@ -189,3 +189,11 @@ ... fun:g_malloc0 } + +{ + + Memcheck:Leak + match-leak-kinds: possible + ... + fun:_ZN18QThreadPoolPrivate11startThreadEP9QRunnable +} From f056b32d752c45b0a7a590cfaac057f0278e3be7 Mon Sep 17 00:00:00 2001 From: Sergio Martins Date: Mon, 8 Apr 2024 21:59:46 +0100 Subject: [PATCH 2/8] chore: Fix minor typo in docker instructions for CI --- .github/actions/qt6-asan/Dockerfile_qtasan | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/qt6-asan/Dockerfile_qtasan b/.github/actions/qt6-asan/Dockerfile_qtasan index ecf6cde08..c74446d5a 100644 --- a/.github/actions/qt6-asan/Dockerfile_qtasan +++ b/.github/actions/qt6-asan/Dockerfile_qtasan @@ -27,7 +27,7 @@ # docker import mycontainer.tar # docker images # to check sha # docker tag iamsergio/kddw-qt6-asan -# docker push +# docker push iamsergio/kddw-qt6-asan FROM ubuntu:24.04 MAINTAINER Sergio Martins (sergio.martins@kdab.com) From 642a35cc1ed97ee1b931042fefabe5d030e4d8c2 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Tue, 9 Apr 2024 11:21:28 -0400 Subject: [PATCH 3/8] sync KDInstallLocation.cmake to upstream no need to keep a slightly forked version. --- CMakeLists.txt | 5 +++-- cmake/KDAB/modules/KDInstallLocation.cmake | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 690374c47..889d6199f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -256,14 +256,15 @@ if(KDDockWidgets_WAYLAND_TESTS) endif() endif() -set(KDDockWidgets_LIBRARY_QTID "") +set(${PROJECT_NAME}_LIBRARY_QTID "") if(KDDW_FRONTEND_QT) include(KDQtInstallPaths) # to set QT_INSTALL_FOO variables if(KDDockWidgets_QT6) - set(KDDockWidgets_LIBRARY_QTID "-qt6") + set(${PROJECT_NAME}_LIBRARY_QTID "-qt6") endif() endif() +set(KDDockWidgets_LIBRARY_QTID "${${PROJECT_NAME}_LIBRARY_QTID}") add_definitions(-DQT_NO_KEYWORDS) diff --git a/cmake/KDAB/modules/KDInstallLocation.cmake b/cmake/KDAB/modules/KDInstallLocation.cmake index aa1436ac1..4b6e9d195 100644 --- a/cmake/KDAB/modules/KDInstallLocation.cmake +++ b/cmake/KDAB/modules/KDInstallLocation.cmake @@ -1,5 +1,5 @@ # -# SPDX-FileCopyrightText: 2012-2023 Klarälvdalens Datakonsult AB, a KDAB Group company +# SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company # # SPDX-License-Identifier: BSD-3-Clause # @@ -30,7 +30,7 @@ if(NOT INSTALL_DATADIR) set(INSTALL_DATADIR ${CMAKE_INSTALL_DATADIR}) endif() if(NOT INSTALL_DOC_DIR) - set(INSTALL_DOC_DIR ${CMAKE_INSTALL_DOCDIR}${KDDockWidgets_LIBRARY_QTID}) + set(INSTALL_DOC_DIR ${CMAKE_INSTALL_DOCDIR}${${PROJECT_NAME}_LIBRARY_QTID}) endif() set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) From 92a485f74eecd387524e9e3614274593a4623fa4 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Tue, 9 Apr 2024 11:29:19 -0400 Subject: [PATCH 4/8] KDPySide2ModuleBuild.cmake - sync to upstream --- cmake/KDAB/modules/KDPySide2ModuleBuild.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/KDAB/modules/KDPySide2ModuleBuild.cmake b/cmake/KDAB/modules/KDPySide2ModuleBuild.cmake index 661962005..78bc8e040 100644 --- a/cmake/KDAB/modules/KDPySide2ModuleBuild.cmake +++ b/cmake/KDAB/modules/KDPySide2ModuleBuild.cmake @@ -1,5 +1,5 @@ # -# SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company +# SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company # Author: Renato Araujo Oliveira Filho # # SPDX-License-Identifier: BSD-3-Clause @@ -129,7 +129,6 @@ macro( $ ${GENERATOR_EXTRA_FLAGS} ${globalInclude} --include-paths=${shiboken_include_dirs} --typesystem-paths=${shiboken_typesystem_dirs} ${shiboken_framework_include_dirs_option} --output-directory=${CMAKE_CURRENT_BINARY_DIR} ${typesystemXML} - COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/python/fixup.py ${outputSource} DEPENDS ${typesystemXML} ${dependsArg} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Running generator for ${libraryName} binding..." From 1567833558e53cc7a462b756a47d27915b92af5d Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Tue, 9 Apr 2024 16:00:36 -0400 Subject: [PATCH 5/8] sync KDPySide2ModuleBuild.py and KDFixupShiboken2.py to upstream replace the fixup.py with the new KDFixupShiboken2.py --- .../KDAB/modules/KDFixupShiboken2.py | 17 ++--------------- cmake/KDAB/modules/KDPySide2ModuleBuild.cmake | 1 + 2 files changed, 3 insertions(+), 15 deletions(-) rename python/fixup.py => cmake/KDAB/modules/KDFixupShiboken2.py (64%) mode change 100644 => 100755 diff --git a/python/fixup.py b/cmake/KDAB/modules/KDFixupShiboken2.py old mode 100644 new mode 100755 similarity index 64% rename from python/fixup.py rename to cmake/KDAB/modules/KDFixupShiboken2.py index 4ba88dd82..39444d48a --- a/python/fixup.py +++ b/cmake/KDAB/modules/KDFixupShiboken2.py @@ -1,21 +1,8 @@ -# This file is part of KDDockWidgets. # # SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company +# Author: Renato Araujo Oliveira Filho # -# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only -# -# Contact KDAB at for commercial licensing options. -# - -# -# This file is part of KDDockWidgets. -# -# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company -# Author: Renato Araujo -# -# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only -# -# Contact KDAB at for commercial licensing options. +# SPDX-License-Identifier: BSD-3-Clause # """ diff --git a/cmake/KDAB/modules/KDPySide2ModuleBuild.cmake b/cmake/KDAB/modules/KDPySide2ModuleBuild.cmake index 78bc8e040..6fe611001 100644 --- a/cmake/KDAB/modules/KDPySide2ModuleBuild.cmake +++ b/cmake/KDAB/modules/KDPySide2ModuleBuild.cmake @@ -129,6 +129,7 @@ macro( $ ${GENERATOR_EXTRA_FLAGS} ${globalInclude} --include-paths=${shiboken_include_dirs} --typesystem-paths=${shiboken_typesystem_dirs} ${shiboken_framework_include_dirs_option} --output-directory=${CMAKE_CURRENT_BINARY_DIR} ${typesystemXML} + COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/KDFixupShiboken2.py ${outputSource} DEPENDS ${typesystemXML} ${dependsArg} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Running generator for ${libraryName} binding..." From 9f68375b8b191efaaf1855cfaa6f0e92b215dc4f Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Wed, 10 Apr 2024 06:21:12 -0400 Subject: [PATCH 6/8] KDPySide2ModuleBuild.cmake - sync to upstream --- cmake/KDAB/modules/KDPySide2ModuleBuild.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/KDAB/modules/KDPySide2ModuleBuild.cmake b/cmake/KDAB/modules/KDPySide2ModuleBuild.cmake index 6fe611001..10235969e 100644 --- a/cmake/KDAB/modules/KDPySide2ModuleBuild.cmake +++ b/cmake/KDAB/modules/KDPySide2ModuleBuild.cmake @@ -5,6 +5,9 @@ # SPDX-License-Identifier: BSD-3-Clause # +# Save path to this cmake file (so it can be used later in the macros) +set(THIS_CMAKE_LIST_DIR ${CMAKE_CURRENT_LIST_DIR}) + if(NOT ${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX) # cmake-lint: disable=C0103 set(${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX @@ -15,6 +18,7 @@ endif() message(STATUS "PYTHON INSTALL PREFIX ${${PROJECT_NAME}_PYTHON_BINDINGS_INSTALL_PREFIX}") + if(WIN32) set(PATH_SEP "\;") else() @@ -129,7 +133,7 @@ macro( $ ${GENERATOR_EXTRA_FLAGS} ${globalInclude} --include-paths=${shiboken_include_dirs} --typesystem-paths=${shiboken_typesystem_dirs} ${shiboken_framework_include_dirs_option} --output-directory=${CMAKE_CURRENT_BINARY_DIR} ${typesystemXML} - COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/KDFixupShiboken2.py ${outputSource} + COMMAND ${Python3_EXECUTABLE} ${THIS_CMAKE_LIST_DIR}/KDFixupShiboken2.py ${outputSource} DEPENDS ${typesystemXML} ${dependsArg} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Running generator for ${libraryName} binding..." From 27d4a13a2d283c99d84e925b2b3a581bad1ab312 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Wed, 10 Apr 2024 07:50:49 -0400 Subject: [PATCH 7/8] prerelease-source.md - Pre-release source code review --- docs/developer/prerelease-source.md | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 docs/developer/prerelease-source.md diff --git a/docs/developer/prerelease-source.md b/docs/developer/prerelease-source.md new file mode 100644 index 000000000..0d461e792 --- /dev/null +++ b/docs/developer/prerelease-source.md @@ -0,0 +1,40 @@ +# Pre-release source code review + +Before creating the tag for the new release check the following: + +* sync KDAB cmake files to upstream + + compare the cmake/KDE files to their upstream versions in ssh://codereview.kdab.com:29418/kdab/extra-cmake-modules + +* sync KDE cmake files to upstream + + compare the cmake/ECM files to their upstream versions in git@invent.kde.org:frameworks/extra-cmake-modules + +* ensures the Doxygen.cmake file is up-to-date for the doxygen version we use on KDABCI + + ```shell + doxygen -u docs/api/Doxyfile.cmake + ``` + +* run a pre-commit check + + ```shell + pre-commit run --all-files + ``` + +* verify ${PROJECT_NAME}_VERSION and ${PROJECT_NAME}_SOVERSION values in the top-level CMakeLists.txt + +* Add the real release date to the Changelog section header "vX.Y.Z (unreleased)" + +* updates distro/.spec and distro/.dsc files +* (TODO) script to do that^^ + +* git commit any changes made above and make sure the CIs are green before continuing. + +Then create the new tag using the command: + +```shell +git tag -m KDDockWidgets vX.Y.Z X.Y.Z" +``` + +**DO NOT PUSH THE TAG YET!** From 034b3ae5a85b14d8e1e3af5c0a47f6142f408407 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Wed, 10 Apr 2024 07:51:14 -0400 Subject: [PATCH 8/8] branching.md - a few style tweaks --- docs/developer/branching.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/developer/branching.md b/docs/developer/branching.md index ab4d95870..0cdcfed0a 100644 --- a/docs/developer/branching.md +++ b/docs/developer/branching.md @@ -17,9 +17,9 @@ If the current stable branch is X.Y then the new branch will be called X.Y+1. For example, if the current stable branch is 2.1 then the new stable branch will be 2.2, like so: ```shell -% git checkout main -% git branch 2.2 -% git checkout 2.2 +git checkout main +git branch 2.2 +git checkout 2.2 ``` ## New major version @@ -30,9 +30,9 @@ If the current stable branch is X.Y then the new branch will be called X+1.0. For example, if the current stable branch is 2.1 then the new stable branch will be 3.0, like so: ```shell -% git checkout main -% git branch 3.0 -% git checkout 3.0 +git checkout main +git branch 3.0 +git checkout 3.0 ``` ## After branching @@ -43,16 +43,16 @@ Once the new branch is created we need to modify a few things. For a new major version: -1. In the top-level `CMakeLists.txt` set `KDDockWidgets_VERSION_MINOR` to 95 -2. In the top-level `CMakeLists.txt` set `KDDockWidgets_VERSION_PATCH` to 95 -3. In the top-level `CMakeLists.txt set` `KDDockWidgets_SOVERSION` to the new X.0 -4. In the `Changelog` add a empty section a the top for the new "vX.0 (unreleased)" +* In the top-level `CMakeLists.txt` set `KDDockWidgets_VERSION_MINOR` to 95 +* In the top-level `CMakeLists.txt` set `KDDockWidgets_VERSION_PATCH` to 95 +* In the top-level `CMakeLists.txt set` `KDDockWidgets_SOVERSION` to the new X.0 +* In the `Changelog` add a empty section a the top for the new "vX.0 (unreleased)" For a new minor version: -1. In the top-level `CMakeLists.txt` set `KDDockWidgets_VERSION_PATCH` to 95 -2. In the top-level `CMakeLists.txt` set `KDDockWidgets_SOVERSION` to the new X.Y -3. In the `Changelog` add a empty section a the top for the new "vX.Y (unreleased)" +* In the top-level `CMakeLists.txt` set `KDDockWidgets_VERSION_PATCH` to 95 +* In the top-level `CMakeLists.txt` set `KDDockWidgets_SOVERSION` to the new X.Y +* In the `Changelog` add a empty section a the top for the new "vX.Y (unreleased)" For any new branch, make sure to add entries for new branch name into the `.github/workflows/build.yml` file, inside the 'push' and 'pull_request" branch lists. @@ -61,6 +61,6 @@ Make all the above changes and then git commit and push the new branch. ### And finally -1. Update the KDABCI to the new stable branch (contact the KDAB CI team) -2. Update the Github Default Branch (see Default Branch setting at ) -3. Initiate CI builds (both github and KDAB) of the new branch and make sure all is green before continuing. +* Update the KDABCI to the new stable branch (contact the KDAB CI team) +* Update the Github Default Branch (see Default Branch setting at ) +* Initiate CI builds (both github and KDAB) of the new branch and make sure all is green before continuing.