From 0bde346c902687e2daaacd6cc5b61ce94e81861a Mon Sep 17 00:00:00 2001 From: Joerg Date: Fri, 18 Oct 2024 17:51:04 +0200 Subject: [PATCH 01/10] Update runner for Linux build to Ubuntu 24.04.01 LTS --- .github/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 960ce1a7d20..529dee42b6c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,8 +15,8 @@ jobs: fail-fast: false matrix: include: - - name: Ubuntu 22.04 - os: ubuntu-22.04 + - name: Ubuntu 24.04 + os: ubuntu-24.04 cmake_args: >- -DQT6=ON -DQML=ON @@ -34,7 +34,7 @@ jobs: cpack_generator: DEB buildenv_basepath: /home/runner/buildenv buildenv_script: tools/debian_buildenv.sh - artifacts_name: Ubuntu 22.04 Qt6 DEB + artifacts_name: Ubuntu 24.04 Qt6 DEB artifacts_path: build/*.deb artifacts_slug: ubuntu-jammy qt_qpa_platform: offscreen @@ -152,7 +152,7 @@ jobs: - name: "[macOS] Set up cmake" uses: jwlawson/actions-setup-cmake@v2.0 - # Ubuntu 22.04 should use the CMake version from the repos. + # Ubuntu 24.04 should use the CMake version from the repos. if: runner.os == 'macOS' with: # This should always match the minimum required version in @@ -161,7 +161,7 @@ jobs: - name: "[Windows] Set up cmake" uses: jwlawson/actions-setup-cmake@v2.0 - # Ubuntu 22.04 should use the CMake version from the repos. + # Ubuntu 24.04 should use the CMake version from the repos. if: runner.os == 'Windows' with: # This is a workaround for a SSL false positive in cmake 3.26.4 @@ -344,7 +344,7 @@ jobs: - name: "Package for PPA" # No need to do the PPA build for both Ubuntu versions - if: matrix.name == 'Ubuntu 22.04' + if: matrix.name == 'Ubuntu 24.04' run: | if [[ "${{ github.ref }}" == "refs/heads/main" ]] && [[ "${{ github.repository }}" == "mixxxdj/mixxx" ]]; then CPACK_ARGS="-D DEB_UPLOAD_PPA=ppa:mixxx/nightlies" From 257488dd902b23f6610dcbfae92e46ba80c2452a Mon Sep 17 00:00:00 2001 From: Joerg Date: Fri, 18 Oct 2024 18:08:52 +0200 Subject: [PATCH 02/10] Update build-checks to Ubuntu 24.04.01 LTS and use Clazy v1.12 --- .github/workflows/build-checks.yml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-checks.yml b/.github/workflows/build-checks.yml index 084cc68ed0d..7ed9fefd882 100644 --- a/.github/workflows/build-checks.yml +++ b/.github/workflows/build-checks.yml @@ -21,13 +21,27 @@ jobs: - name: clazy - name: clang-tidy - name: coverage - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 name: ${{ matrix.name }} steps: - name: Check out repository uses: actions/checkout@v4.2.1 - name: Install build dependencies run: tools/debian_buildenv.sh setup + - name: Build clazy v1.12 + if: matrix.name == 'clazy' + # Ubuntu2404 comes with v1.11, which is too old for the Qt6.4 shipped with Ubuntu 2404 + run: | + sudo apt-get update + sudo apt-get install -y llvm-dev libclang-dev clang + git clone --branch v1.12 --single-branch https://github.com/KDE/clazy.git + cd clazy + mkdir build + cd build + cmake .. + make -j$(nproc) + sudo make install + clazy --version - name: Create build directory run: mkdir build - name: Configure (clazy) @@ -61,6 +75,8 @@ jobs: CXX: clazy - name: Configure (clang-tidy) if: matrix.name == 'clang-tidy' + # Our code contains the use of infinity(), which Clang >= 18 reports + # as error, if you compile with -fast-math run: | cmake \ -DCMAKE_BUILD_TYPE=Debug \ @@ -81,6 +97,7 @@ jobs: -DMAD=ON \ -DMODPLUG=ON \ -DWAVPACK=ON \ + -DCMAKE_CXX_FLAGS="-Wno-nan-infinity-disabled" \ .. working-directory: build env: @@ -116,19 +133,12 @@ jobs: working-directory: build - name: Set up problem matcher uses: ammaraskar/gcc-problem-matcher@0.3.0 - # Work around https://github.com/actions/runner-images/issues/8659 - - name: "Remove GCC 13 from runner image (workaround)" - shell: bash - run: | - sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list - sudo apt-get update - sudo apt-get install -y --allow-downgrades libc6=2.35* libc6-dev=2.35* libstdc++6=12.3.0-1ubuntu1~22.04 libgcc-s1=12.3.0-1ubuntu1~22.04 - name: Build # Do not abort on errors and build/check the whole project run: cmake --build . -j $(nproc) -- --keep-going working-directory: build env: - CLAZY_CHECKS: level2,container-inside-loop,heap-allocated-small-trivial-type,isempty-vs-count,qhash-with-char-pointer-key,qproperty-type-mismatch,tr-non-literal,no-rule-of-two-soft,no-non-pod-global-static,no-qproperty-without-notify,no-qstring-allocations,no-function-args-by-value,no-copyable-polymorphic,no-ctor-missing-parent-argument,no-missing-qobject-macro,no-rule-of-three,no-returning-void-expression + CLAZY_CHECKS: level2,container-inside-loop,heap-allocated-small-trivial-type,isempty-vs-count,qhash-with-char-pointer-key,qproperty-type-mismatch,tr-non-literal,no-rule-of-two-soft,no-non-pod-global-static,no-qproperty-without-notify,no-qstring-allocations,no-function-args-by-value,no-copyable-polymorphic,no-ctor-missing-parent-argument,no-missing-qobject-macro,no-rule-of-three,no-returning-void-expression,no-no-module-include CLAZY_IGNORE_DIRS: lib/.* - name: "Test" if: matrix.name == 'coverage' @@ -159,6 +169,6 @@ jobs: continue-on-error: true uses: coverallsapp/github-action@v2.3.1 with: - flag-name: ubuntu-22.04 + flag-name: ubuntu-24.04 path-to-lcov: build/lcov.info github-token: ${{ secrets.GITHUB_TOKEN }} From 692c64e93dfc1a2efef7ed39073afb69a8ee2815 Mon Sep 17 00:00:00 2001 From: Joerg Date: Sun, 20 Oct 2024 09:11:54 +0200 Subject: [PATCH 03/10] Reduced include scope from module include of QtQml by class include of QQmlEngine --- src/control/controlsortfiltermodel.h | 2 +- src/qml/qmlchainpresetmodel.h | 2 +- src/qml/qmlconfigproxy.h | 2 +- src/qml/qmlcontrolproxy.h | 2 +- src/qml/qmldlgpreferencesproxy.h | 2 +- src/qml/qmleffectmanifestparametersmodel.h | 2 +- src/qml/qmleffectslotproxy.h | 2 +- src/qml/qmleffectsmanagerproxy.h | 2 +- src/qml/qmllibraryproxy.h | 2 +- src/qml/qmllibrarytracklistmodel.h | 2 +- src/qml/qmlplayermanagerproxy.h | 2 +- src/qml/qmlplayerproxy.h | 2 +- src/qml/qmlvisibleeffectsmodel.h | 2 +- src/qml/qmlwaveformoverview.h | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/control/controlsortfiltermodel.h b/src/control/controlsortfiltermodel.h index 62db5a012b3..0b1517b950f 100644 --- a/src/control/controlsortfiltermodel.h +++ b/src/control/controlsortfiltermodel.h @@ -3,7 +3,7 @@ #include #include #ifdef MIXXX_USE_QML -#include +#include #else #define QML_ELEMENT #endif diff --git a/src/qml/qmlchainpresetmodel.h b/src/qml/qmlchainpresetmodel.h index 76db06f75f6..a86c7182288 100644 --- a/src/qml/qmlchainpresetmodel.h +++ b/src/qml/qmlchainpresetmodel.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include "effects/defs.h" diff --git a/src/qml/qmlconfigproxy.h b/src/qml/qmlconfigproxy.h index cfa4994d994..a0e107276d9 100644 --- a/src/qml/qmlconfigproxy.h +++ b/src/qml/qmlconfigproxy.h @@ -1,8 +1,8 @@ #pragma once #include #include +#include #include -#include #include "preferences/usersettings.h" diff --git a/src/qml/qmlcontrolproxy.h b/src/qml/qmlcontrolproxy.h index 326d85c1185..f5e1fe18c2d 100644 --- a/src/qml/qmlcontrolproxy.h +++ b/src/qml/qmlcontrolproxy.h @@ -1,8 +1,8 @@ #pragma once #include +#include #include -#include #include #include "control/controlproxy.h" diff --git a/src/qml/qmldlgpreferencesproxy.h b/src/qml/qmldlgpreferencesproxy.h index 724c7efc5be..40e73ea300a 100644 --- a/src/qml/qmldlgpreferencesproxy.h +++ b/src/qml/qmldlgpreferencesproxy.h @@ -2,7 +2,7 @@ #include #include -#include +#include #include namespace mixxx { diff --git a/src/qml/qmleffectmanifestparametersmodel.h b/src/qml/qmleffectmanifestparametersmodel.h index 556422b8d86..a85660c3935 100644 --- a/src/qml/qmleffectmanifestparametersmodel.h +++ b/src/qml/qmleffectmanifestparametersmodel.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include #include "effects/effectsmanager.h" diff --git a/src/qml/qmleffectslotproxy.h b/src/qml/qmleffectslotproxy.h index 2929afa9092..99b26ec9378 100644 --- a/src/qml/qmleffectslotproxy.h +++ b/src/qml/qmleffectslotproxy.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include "effects/effectsmanager.h" #include "qml/qmleffectmanifestparametersmodel.h" diff --git a/src/qml/qmleffectsmanagerproxy.h b/src/qml/qmleffectsmanagerproxy.h index 219accbb57a..410a4d4a2f0 100644 --- a/src/qml/qmleffectsmanagerproxy.h +++ b/src/qml/qmleffectsmanagerproxy.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include "effects/effectsmanager.h" #include "qml/qmlchainpresetmodel.h" diff --git a/src/qml/qmllibraryproxy.h b/src/qml/qmllibraryproxy.h index 56bb0f0783e..3b5d80967b9 100644 --- a/src/qml/qmllibraryproxy.h +++ b/src/qml/qmllibraryproxy.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include #include "qml/qmllibrarytracklistmodel.h" diff --git a/src/qml/qmllibrarytracklistmodel.h b/src/qml/qmllibrarytracklistmodel.h index 490ff4508c8..10d8e9d5353 100644 --- a/src/qml/qmllibrarytracklistmodel.h +++ b/src/qml/qmllibrarytracklistmodel.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include class LibraryTableModel; diff --git a/src/qml/qmlplayermanagerproxy.h b/src/qml/qmlplayermanagerproxy.h index e0226da802f..690088dc881 100644 --- a/src/qml/qmlplayermanagerproxy.h +++ b/src/qml/qmlplayermanagerproxy.h @@ -1,7 +1,7 @@ #pragma once #include +#include #include -#include #include "mixer/playermanager.h" #include "qml/qmlplayerproxy.h" diff --git a/src/qml/qmlplayerproxy.h b/src/qml/qmlplayerproxy.h index 8d97eba0f36..54f42bb9c9a 100644 --- a/src/qml/qmlplayerproxy.h +++ b/src/qml/qmlplayerproxy.h @@ -2,9 +2,9 @@ #include #include #include +#include #include #include -#include #include "mixer/basetrackplayer.h" #include "qml/qmlbeatsmodel.h" diff --git a/src/qml/qmlvisibleeffectsmodel.h b/src/qml/qmlvisibleeffectsmodel.h index df62dc90304..e102a393b62 100644 --- a/src/qml/qmlvisibleeffectsmodel.h +++ b/src/qml/qmlvisibleeffectsmodel.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include #include "effects/effectsmanager.h" diff --git a/src/qml/qmlwaveformoverview.h b/src/qml/qmlwaveformoverview.h index 810cbd92e5f..0c0ecb7c909 100644 --- a/src/qml/qmlwaveformoverview.h +++ b/src/qml/qmlwaveformoverview.h @@ -2,9 +2,9 @@ #include #include +#include #include #include -#include #include "qml/qmlplayerproxy.h" #include "track/track.h" From 658faa7342a4829c274a706af69c05ca39bb9b47 Mon Sep 17 00:00:00 2001 From: Joerg Date: Sun, 20 Oct 2024 09:13:23 +0200 Subject: [PATCH 04/10] Enable clazy module include check --- .github/workflows/build-checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-checks.yml b/.github/workflows/build-checks.yml index 7ed9fefd882..a734acb61d3 100644 --- a/.github/workflows/build-checks.yml +++ b/.github/workflows/build-checks.yml @@ -138,7 +138,7 @@ jobs: run: cmake --build . -j $(nproc) -- --keep-going working-directory: build env: - CLAZY_CHECKS: level2,container-inside-loop,heap-allocated-small-trivial-type,isempty-vs-count,qhash-with-char-pointer-key,qproperty-type-mismatch,tr-non-literal,no-rule-of-two-soft,no-non-pod-global-static,no-qproperty-without-notify,no-qstring-allocations,no-function-args-by-value,no-copyable-polymorphic,no-ctor-missing-parent-argument,no-missing-qobject-macro,no-rule-of-three,no-returning-void-expression,no-no-module-include + CLAZY_CHECKS: level2,container-inside-loop,heap-allocated-small-trivial-type,isempty-vs-count,qhash-with-char-pointer-key,qproperty-type-mismatch,tr-non-literal,no-rule-of-two-soft,no-non-pod-global-static,no-qproperty-without-notify,no-qstring-allocations,no-function-args-by-value,no-copyable-polymorphic,no-ctor-missing-parent-argument,no-missing-qobject-macro,no-rule-of-three,no-returning-void-expression CLAZY_IGNORE_DIRS: lib/.* - name: "Test" if: matrix.name == 'coverage' From a837df6d71e227b1f22d353a03d819641cc87f32 Mon Sep 17 00:00:00 2001 From: Joerg Date: Sun, 20 Oct 2024 10:17:33 +0200 Subject: [PATCH 05/10] Removed module wide include of QtSql and added class includes where necessary --- src/dialog/dlgreplacecuecolor.cpp | 2 ++ src/library/banshee/bansheedbconnection.cpp | 11 +++++++---- src/library/banshee/bansheedbconnection.h | 1 + src/library/banshee/bansheeplaylistmodel.cpp | 1 + src/library/baseexternaltrackmodel.cpp | 3 +++ src/library/basesqltablemodel.h | 1 - src/library/basetracktablemodel.cpp | 2 ++ src/library/browse/browsefeature.cpp | 1 + src/library/browse/browsefeature.h | 9 +++++---- src/library/browse/browsetablemodel.cpp | 1 + src/library/dao/analysisdao.cpp | 1 + src/library/dao/cuedao.cpp | 1 + src/library/dao/libraryhashdao.cpp | 3 +++ src/library/queryutil.h | 5 ++++- src/library/trackmodel.h | 1 - src/library/trackset/baseplaylistfeature.cpp | 2 ++ src/library/trackset/crate/cratefeature.cpp | 1 + src/library/trackset/playlistfeature.cpp | 1 + src/library/trackset/setlogfeature.cpp | 1 + src/library/traktor/traktorfeature.cpp | 1 + src/library/traktor/traktorfeature.h | 1 - src/test/directorydaotest.cpp | 1 - 22 files changed, 38 insertions(+), 13 deletions(-) diff --git a/src/dialog/dlgreplacecuecolor.cpp b/src/dialog/dlgreplacecuecolor.cpp index f0e7fbba201..4b98d2a34e6 100644 --- a/src/dialog/dlgreplacecuecolor.cpp +++ b/src/dialog/dlgreplacecuecolor.cpp @@ -5,6 +5,8 @@ #include #include #include +#include +#include #include #include "engine/controls/cuecontrol.h" diff --git a/src/library/banshee/bansheedbconnection.cpp b/src/library/banshee/bansheedbconnection.cpp index 4c6bf54638e..ac3f0e5c06f 100644 --- a/src/library/banshee/bansheedbconnection.cpp +++ b/src/library/banshee/bansheedbconnection.cpp @@ -1,12 +1,15 @@ -#include -#include -#include +#include "library/banshee/bansheedbconnection.h" + #include #include +#include +#include #include +#include +#include +#include #include "library/queryutil.h" -#include "library/banshee/bansheedbconnection.h" #include "util/performancetimer.h" BansheeDbConnection::BansheeDbConnection() { diff --git a/src/library/banshee/bansheedbconnection.h b/src/library/banshee/bansheedbconnection.h index 5b59bd638d3..65138d8793c 100644 --- a/src/library/banshee/bansheedbconnection.h +++ b/src/library/banshee/bansheedbconnection.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include diff --git a/src/library/banshee/bansheeplaylistmodel.cpp b/src/library/banshee/bansheeplaylistmodel.cpp index b6203ba009b..20082a04c11 100644 --- a/src/library/banshee/bansheeplaylistmodel.cpp +++ b/src/library/banshee/bansheeplaylistmodel.cpp @@ -1,5 +1,6 @@ #include "library/banshee/bansheeplaylistmodel.h" +#include #include #include "library/banshee/bansheedbconnection.h" diff --git a/src/library/baseexternaltrackmodel.cpp b/src/library/baseexternaltrackmodel.cpp index 7b31331900d..45f986a5121 100644 --- a/src/library/baseexternaltrackmodel.cpp +++ b/src/library/baseexternaltrackmodel.cpp @@ -1,5 +1,8 @@ #include "library/baseexternaltrackmodel.h" +#include +#include + #include "library/dao/trackschema.h" #include "library/queryutil.h" #include "library/trackcollectionmanager.h" diff --git a/src/library/basesqltablemodel.h b/src/library/basesqltablemodel.h index 4ed12b93724..264c05d3f76 100644 --- a/src/library/basesqltablemodel.h +++ b/src/library/basesqltablemodel.h @@ -1,7 +1,6 @@ #pragma once #include -#include #include "library/basetrackcache.h" #include "library/dao/trackdao.h" diff --git a/src/library/basetracktablemodel.cpp b/src/library/basetracktablemodel.cpp index d45bc23d609..70a8002db85 100644 --- a/src/library/basetracktablemodel.cpp +++ b/src/library/basetracktablemodel.cpp @@ -1,6 +1,8 @@ #include "library/basetracktablemodel.h" +#include #include +#include #include #include diff --git a/src/library/browse/browsefeature.cpp b/src/library/browse/browsefeature.cpp index 5c1eef82040..f87930b2acd 100644 --- a/src/library/browse/browsefeature.cpp +++ b/src/library/browse/browsefeature.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include diff --git a/src/library/browse/browsefeature.h b/src/library/browse/browsefeature.h index eb363715edc..dd633e75365 100644 --- a/src/library/browse/browsefeature.h +++ b/src/library/browse/browsefeature.h @@ -1,15 +1,16 @@ #pragma once -#include -#include #include -#include +#include +#include #include +#include +#include -#include "preferences/usersettings.h" #include "library/browse/browsetablemodel.h" #include "library/libraryfeature.h" #include "library/proxytrackmodel.h" +#include "preferences/usersettings.h" #define QUICK_LINK_NODE "::mixxx_quick_lnk_node::" #define DEVICE_NODE "::mixxx_device_node::" diff --git a/src/library/browse/browsetablemodel.cpp b/src/library/browse/browsetablemodel.cpp index 8ee4e47b776..ec0758dcbbb 100644 --- a/src/library/browse/browsetablemodel.cpp +++ b/src/library/browse/browsetablemodel.cpp @@ -1,6 +1,7 @@ #include "library/browse/browsetablemodel.h" #include +#include #include #include diff --git a/src/library/dao/analysisdao.cpp b/src/library/dao/analysisdao.cpp index 30e9e1ed3da..d485fc5dbca 100644 --- a/src/library/dao/analysisdao.cpp +++ b/src/library/dao/analysisdao.cpp @@ -1,6 +1,7 @@ #include "library/dao/analysisdao.h" #include +#include #include #include "library/queryutil.h" diff --git a/src/library/dao/cuedao.cpp b/src/library/dao/cuedao.cpp index 5533382e3dd..5be8c94ef24 100644 --- a/src/library/dao/cuedao.cpp +++ b/src/library/dao/cuedao.cpp @@ -1,5 +1,6 @@ #include "library/dao/cuedao.h" +#include #include #include diff --git a/src/library/dao/libraryhashdao.cpp b/src/library/dao/libraryhashdao.cpp index 1b824f034f9..49dde25b78b 100644 --- a/src/library/dao/libraryhashdao.cpp +++ b/src/library/dao/libraryhashdao.cpp @@ -1,5 +1,8 @@ #include "libraryhashdao.h" +#include +#include +#include #include #include #include diff --git a/src/library/queryutil.h b/src/library/queryutil.h index 0abb0220bc1..eaaa9ba3dd0 100644 --- a/src/library/queryutil.h +++ b/src/library/queryutil.h @@ -1,7 +1,10 @@ #pragma once +#include +#include +#include +#include #include -#include #define LOG_FAILED_QUERY(query) qWarning() << __FILE__ << __LINE__ << "FAILED QUERY [" \ diff --git a/src/library/trackmodel.h b/src/library/trackmodel.h index c8bdb81f210..3ef3c67d405 100644 --- a/src/library/trackmodel.h +++ b/src/library/trackmodel.h @@ -4,7 +4,6 @@ #include #include #include -#include #include "library/coverart.h" #include "library/dao/settingsdao.h" diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index e3de10e0ab7..71362d34885 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -4,6 +4,8 @@ #include #include #include +#include +#include #include "library/export/trackexportwizard.h" #include "library/library.h" diff --git a/src/library/trackset/crate/cratefeature.cpp b/src/library/trackset/crate/cratefeature.cpp index 7f872f22d20..4de07c8b02d 100644 --- a/src/library/trackset/crate/cratefeature.cpp +++ b/src/library/trackset/crate/cratefeature.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include diff --git a/src/library/trackset/playlistfeature.cpp b/src/library/trackset/playlistfeature.cpp index a9f6b93d7ce..c5f0258ec7d 100644 --- a/src/library/trackset/playlistfeature.cpp +++ b/src/library/trackset/playlistfeature.cpp @@ -1,6 +1,7 @@ #include "library/trackset/playlistfeature.h" #include +#include #include #include "library/library.h" diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index 7f7b8a01487..68d4bd80a78 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -2,6 +2,7 @@ #include #include +#include #include "library/library.h" #include "library/library_prefs.h" diff --git a/src/library/traktor/traktorfeature.cpp b/src/library/traktor/traktorfeature.cpp index 0e9da33be31..5575410984d 100644 --- a/src/library/traktor/traktorfeature.cpp +++ b/src/library/traktor/traktorfeature.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include diff --git a/src/library/traktor/traktorfeature.h b/src/library/traktor/traktorfeature.h index 3a812733d00..1ed49a53deb 100644 --- a/src/library/traktor/traktorfeature.h +++ b/src/library/traktor/traktorfeature.h @@ -1,7 +1,6 @@ #pragma once #include -#include #include #include #include diff --git a/src/test/directorydaotest.cpp b/src/test/directorydaotest.cpp index 95f3aa61936..06647d416ae 100644 --- a/src/test/directorydaotest.cpp +++ b/src/test/directorydaotest.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include "library/dao/directorydao.h" #include "library/dao/trackdao.h" From e487fc4b73c1011da231eaf4fcc9c5e47ccbcf4d Mon Sep 17 00:00:00 2001 From: Joerg Date: Sun, 20 Oct 2024 11:27:35 +0200 Subject: [PATCH 06/10] Removed module wide include of QtConcurrent and added sub includes where necessary --- src/library/coverartcache.cpp | 2 +- src/library/itunes/itunesfeature.cpp | 3 ++- src/library/rhythmbox/rhythmboxfeature.cpp | 4 +++- src/library/serato/seratofeature.cpp | 5 ++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/library/coverartcache.cpp b/src/library/coverartcache.cpp index 5f07813abad..8395b16015b 100644 --- a/src/library/coverartcache.cpp +++ b/src/library/coverartcache.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include "moc_coverartcache.cpp" diff --git a/src/library/itunes/itunesfeature.cpp b/src/library/itunes/itunesfeature.cpp index b16ceffbf4f..6fcacd6ba59 100644 --- a/src/library/itunes/itunesfeature.cpp +++ b/src/library/itunes/itunesfeature.cpp @@ -4,7 +4,8 @@ #include #include #include -#include +#include +#include #include #include #include diff --git a/src/library/rhythmbox/rhythmboxfeature.cpp b/src/library/rhythmbox/rhythmboxfeature.cpp index 9a38477e2b3..4ad6bfa28da 100644 --- a/src/library/rhythmbox/rhythmboxfeature.cpp +++ b/src/library/rhythmbox/rhythmboxfeature.cpp @@ -2,7 +2,9 @@ #include #include -#include +#include +#include +#include #include #include "library/baseexternalplaylistmodel.h" diff --git a/src/library/serato/seratofeature.cpp b/src/library/serato/seratofeature.cpp index 3ebc511bb1c..66e85650a82 100644 --- a/src/library/serato/seratofeature.cpp +++ b/src/library/serato/seratofeature.cpp @@ -1,9 +1,12 @@ #include "library/serato/seratofeature.h" +#include #include +#include #include -#include +#include #include +#include #include "library/dao/trackschema.h" #include "library/library.h" From 2f3f826f69e98d19f4eaec0b4ec9c955f05c2aa2 Mon Sep 17 00:00:00 2001 From: Joerg Date: Sun, 20 Oct 2024 11:49:47 +0200 Subject: [PATCH 07/10] Removed module wide include of QtDbus and added class includes instead --- src/mixxxmainwindow.cpp | 3 ++- src/util/desktophelper.cpp | 3 ++- src/util/screensaver.cpp | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mixxxmainwindow.cpp b/src/mixxxmainwindow.cpp index c5b44237bf9..50ed223b7c4 100644 --- a/src/mixxxmainwindow.cpp +++ b/src/mixxxmainwindow.cpp @@ -12,7 +12,8 @@ #endif #ifdef __LINUX__ -#include +#include +#include #endif #ifdef MIXXX_USE_QOPENGL diff --git a/src/util/desktophelper.cpp b/src/util/desktophelper.cpp index 378a354d96e..8cf849ba68a 100644 --- a/src/util/desktophelper.cpp +++ b/src/util/desktophelper.cpp @@ -8,8 +8,9 @@ #include #ifdef Q_OS_LINUX +#include +#include #include -#include #endif namespace { diff --git a/src/util/screensaver.cpp b/src/util/screensaver.cpp index 1a5963bfefb..9eae4a1b4cd 100644 --- a/src/util/screensaver.cpp +++ b/src/util/screensaver.cpp @@ -29,7 +29,9 @@ With the help of the following source codes: #elif defined(_WIN32) # include #elif defined(__LINUX__) -# include +#include +#include +#include #elif defined(HAVE_XSCREENSAVER_SUSPEND) && HAVE_XSCREENSAVER_SUSPEND # include #endif From 46d98adcedc05a4b175ffbcad01fe6d6aab7611e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Thu, 7 Nov 2024 23:27:34 +0100 Subject: [PATCH 08/10] Add clazy PPA to work around the outdated clazy 1.11 version --- .github/workflows/build-checks.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-checks.yml b/.github/workflows/build-checks.yml index d29245dd2c9..ef706701f25 100644 --- a/.github/workflows/build-checks.yml +++ b/.github/workflows/build-checks.yml @@ -26,22 +26,13 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v4.2.1 + - name: Add clazy PPA + # Ubuntu2404 comes with v1.11, which is too old for the Qt6.4 shipped with Ubuntu 24.04 + run: | + sudo add-apt-repository ppa:daschuer/clazy + sudo apt update - name: Install build dependencies run: tools/debian_buildenv.sh setup - - name: Build clazy v1.12 - if: matrix.name == 'clazy' - # Ubuntu2404 comes with v1.11, which is too old for the Qt6.4 shipped with Ubuntu 2404 - run: | - sudo apt-get update - sudo apt-get install -y llvm-dev libclang-dev clang - git clone --branch v1.12 --single-branch https://github.com/KDE/clazy.git - cd clazy - mkdir build - cd build - cmake .. - make -j$(nproc) - sudo make install - clazy --version - name: Create build directory run: mkdir build - name: Configure (clazy) From aa0594060dec14dd8f9abb88dd75b170a00ede5e Mon Sep 17 00:00:00 2001 From: Joerg Date: Sun, 10 Nov 2024 18:18:06 +0100 Subject: [PATCH 09/10] Restore lost clazy version printout, and only install clazy for the clazy runner --- .github/workflows/build-checks.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-checks.yml b/.github/workflows/build-checks.yml index ef706701f25..4ea6b5a182a 100644 --- a/.github/workflows/build-checks.yml +++ b/.github/workflows/build-checks.yml @@ -27,6 +27,7 @@ jobs: - name: Check out repository uses: actions/checkout@v4.2.1 - name: Add clazy PPA + if: matrix.name == 'clazy' # Ubuntu2404 comes with v1.11, which is too old for the Qt6.4 shipped with Ubuntu 24.04 run: | sudo add-apt-repository ppa:daschuer/clazy @@ -39,6 +40,7 @@ jobs: if: matrix.name == 'clazy' # Disable optimizations as workaround for Clang 9 bug: https://bugs.llvm.org/show_bug.cgi?id=45034 run: | + clazy --version cmake \ -DCMAKE_BUILD_TYPE=Debug \ -DWARNINGS_FATAL=ON \ From 4142e7f51b4dcc133fce645a8d94003d9a197e67 Mon Sep 17 00:00:00 2001 From: Joerg Date: Mon, 11 Nov 2024 18:27:22 +0100 Subject: [PATCH 10/10] Add comments at the issue locations, that we don't forget to remove -Wno-nan-infinity-disabled when the issue is fixed --- src/test/durationutiltest.cpp | 2 ++ src/test/frametest.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/test/durationutiltest.cpp b/src/test/durationutiltest.cpp index f918d1a3f5c..44073368923 100644 --- a/src/test/durationutiltest.cpp +++ b/src/test/durationutiltest.cpp @@ -115,6 +115,8 @@ TEST_F(DurationUtilTest, formatTime) { formatTime("24:00:00.000", 24 * 3600); formatTime("24:00:01.000", 24 * 3600 + 1); formatTime("25:00:01.000", 25 * 3600 + 1); + // If you change the following line, check if it solves #13780, + // and allows to remove -Wno-nan-infinity-disabled from the clang-tidy call formatTime("?", std::numeric_limits::infinity()); formatTime("?", -1); } diff --git a/src/test/frametest.cpp b/src/test/frametest.cpp index 6df0eb8332a..99f987212a6 100644 --- a/src/test/frametest.cpp +++ b/src/test/frametest.cpp @@ -18,6 +18,8 @@ TEST_F(FrameTest, TestFramePosValid) { // Denormals EXPECT_TRUE(mixxx::audio::FramePos(0.0).isValid()); EXPECT_TRUE(mixxx::audio::FramePos(std::numeric_limits::min() / 2.0).isValid()); + // If you change the following line, check if it solves #13780, + // and allows to remove -Wno-nan-infinity-disabled from the clang-tidy call EXPECT_FALSE(mixxx::audio::FramePos(std::numeric_limits::infinity()).isValid()); // NaN EXPECT_FALSE(mixxx::audio::FramePos().isValid()); @@ -53,6 +55,8 @@ TEST_F(FrameTest, TestFramePosEquality) { EXPECT_EQ(mixxx::audio::FramePos(), mixxx::audio::FramePos(std::numeric_limits< mixxx::audio::FramePos::value_t>::quiet_NaN())); + // If you change the following 3 tests, check if it solves #13780, + // and allows to remove -Wno-nan-infinity-disabled from the clang-tidy call EXPECT_EQ(mixxx::audio::FramePos(), mixxx::audio::FramePos(std::numeric_limits< mixxx::audio::FramePos::value_t>::infinity()));