diff --git a/.github/workflows/ci_file_health.yaml b/.github/workflows/ci_file_health.yaml index bfad2f3ffd5c..fb5cb44e69d2 100644 --- a/.github/workflows/ci_file_health.yaml +++ b/.github/workflows/ci_file_health.yaml @@ -32,7 +32,7 @@ jobs: curl \ -L \ -o "${{ runner.temp }}/pandoc.tar.gz" \ - "https://github.com/jgm/pandoc/releases/download/3.4/pandoc-3.4-linux-amd64.tar.gz" + "https://github.com/jgm/pandoc/releases/download/3.6/pandoc-3.6-linux-amd64.tar.gz" tar -xf "${{ runner.temp }}/pandoc.tar.gz" -C "${{ github.workspace }}/.." mv "${{ github.workspace }}/.."/pandoc-* "${{ env.pandoc_path }}" # run pandoc diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml deleted file mode 100644 index 85bda25b6d8e..000000000000 --- a/.github/workflows/ci_macos.yaml +++ /dev/null @@ -1,149 +0,0 @@ -name: CI - macOS - -on: [pull_request, push] - -permissions: - actions: write - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: ${{ github.head_ref != '' }} - -jobs: - ci: - name: Build - runs-on: macos-latest - - strategy: - fail-fast: false - matrix: - libt_version: ["2.0.10", "1.2.19"] - qbt_gui: ["GUI=ON", "GUI=OFF"] - qt_version: ["6.7.0"] - - env: - boost_path: "${{ github.workspace }}/../boost" - libtorrent_path: "${{ github.workspace }}/../libtorrent" - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install dependencies - uses: Wandalen/wretry.action@v3 - env: - HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 - HOMEBREW_NO_INSTALL_CLEANUP: 1 - with: - attempt_delay: 20000 - attempt_limit: 6 - command: | - brew update > /dev/null - brew install \ - cmake ninja \ - openssl@3 zlib - - - name: Setup ccache - uses: Chocobo1/setup-ccache-action@v1 - with: - store_cache: ${{ github.ref == 'refs/heads/master' }} - update_packager_index: false - ccache_options: | - max_size=2G - - - name: Install boost - env: - BOOST_MAJOR_VERSION: "1" - BOOST_MINOR_VERSION: "86" - BOOST_PATCH_VERSION: "0" - run: | - boost_url="https://boostorg.jfrog.io/artifactory/main/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz" - boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz" - set +e - curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url" - tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?" - if [ "$_exitCode" -ne "0" ]; then - curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2" - tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?" - fi - mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}" - - - name: Install Qt - uses: jurplel/install-qt-action@v4 - with: - version: ${{ matrix.qt_version }} - archives: qtbase qtdeclarative qtsvg qttools - # Not sure why Qt made a hard dependency on qtdeclarative, try removing it when Qt > 6.4.0 - cache: true - - - name: Install libtorrent - run: | - git clone \ - --branch v${{ matrix.libt_version }} \ - --depth 1 \ - --recurse-submodules \ - https://github.com/arvidn/libtorrent.git \ - ${{ env.libtorrent_path }} - cd ${{ env.libtorrent_path }} - cmake \ - -B build \ - -G "Ninja" \ - -DBUILD_SHARED_LIBS=OFF \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_CXX_STANDARD=17 \ - -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ - -DBOOST_ROOT="${{ env.boost_path }}" \ - -Ddeprecated-functions=OFF - cmake --build build - sudo cmake --install build - - - name: Build qBittorrent - run: | - CXXFLAGS="$CXXFLAGS -DQT_FORCE_ASSERTS -Werror -Wno-error=deprecated-declarations" \ - LDFLAGS="$LDFLAGS -gz" \ - cmake \ - -B build \ - -G "Ninja" \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ - -DBOOST_ROOT="${{ env.boost_path }}" \ - -DTESTING=ON \ - -DVERBOSE_CONFIGURE=ON \ - -D${{ matrix.qbt_gui }} - cmake --build build --target qbt_update_translations - cmake --build build - cmake --build build --target check - - - name: Prepare build artifacts - run: | - # create .dmg - appName="qbittorrent" - if [ "${{ matrix.qbt_gui }}" = "GUI=OFF" ]; then - appName="qbittorrent-nox" - fi - # package - pushd build - PACKAGE_RETRY=0 - while [ "$PACKAGE_RETRY" -lt "3" ]; do - macdeployqt "$appName.app" -dmg -no-strip - if [ -f "$appName.dmg" ]; then - break - fi - sleep 5 - PACKAGE_RETRY=$((PACKAGE_RETRY + 1)) - echo "Retry $PACKAGE_RETRY..." - done - popd - # prepare upload folder - mkdir upload - cp "build/$appName.dmg" upload - mkdir upload/cmake - cp build/compile_commands.json upload/cmake - mkdir upload/cmake/libtorrent - cp ${{ env.libtorrent_path }}/build/compile_commands.json upload/cmake/libtorrent - - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }} - path: upload diff --git a/.github/workflows/ci_ubuntu.yaml b/.github/workflows/ci_ubuntu.yaml deleted file mode 100644 index 7f22c4803bf4..000000000000 --- a/.github/workflows/ci_ubuntu.yaml +++ /dev/null @@ -1,170 +0,0 @@ -name: CI - Ubuntu - -on: [pull_request, push] - -permissions: - actions: write - security-events: write - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: ${{ github.head_ref != '' }} - -jobs: - ci: - name: Build - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - libt_version: ["2.0.10", "1.2.19"] - qbt_gui: ["GUI=ON", "GUI=OFF"] - qt_version: ["6.5.2"] - - env: - boost_path: "${{ github.workspace }}/../boost" - harden_flags: "-D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS" - libtorrent_path: "${{ github.workspace }}/../libtorrent" - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - sudo apt update - sudo apt install \ - build-essential cmake ninja-build \ - libssl-dev libxkbcommon-x11-dev libxcb-cursor-dev zlib1g-dev - - - name: Setup ccache - uses: Chocobo1/setup-ccache-action@v1 - with: - store_cache: ${{ github.ref == 'refs/heads/master' }} - update_packager_index: false - ccache_options: | - max_size=2G - - - name: Install boost - env: - BOOST_MAJOR_VERSION: "1" - BOOST_MINOR_VERSION: "76" - BOOST_PATCH_VERSION: "0" - run: | - boost_url="https://boostorg.jfrog.io/artifactory/main/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz" - boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz" - set +e - curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url" - tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?" - if [ "$_exitCode" -ne "0" ]; then - curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2" - tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?" - fi - mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}" - - - name: Install Qt - uses: jurplel/install-qt-action@v4 - with: - version: ${{ matrix.qt_version }} - archives: icu qtbase qtdeclarative qtsvg qttools - cache: true - - - name: Install libtorrent - run: | - git clone \ - --branch v${{ matrix.libt_version }} \ - --depth 1 \ - --recurse-submodules \ - https://github.com/arvidn/libtorrent.git \ - ${{ env.libtorrent_path }} - cd ${{ env.libtorrent_path }} - CXXFLAGS="$CXXFLAGS ${{ env.harden_flags }}" \ - cmake \ - -B build \ - -G "Ninja" \ - -DBUILD_SHARED_LIBS=OFF \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ - -DBOOST_ROOT="${{ env.boost_path }}" \ - -Ddeprecated-functions=OFF - cmake --build build - sudo cmake --install build - - # to avoid scanning 3rdparty codebases, initialize it just before building qbt - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON') - with: - config-file: ./.github/workflows/helper/codeql/cpp.yaml - languages: cpp - - - name: Build qBittorrent - run: | - CXXFLAGS="$CXXFLAGS ${{ env.harden_flags }} -DQT_FORCE_ASSERTS -Werror" \ - LDFLAGS="$LDFLAGS -gz" \ - cmake \ - -B build \ - -G "Ninja" \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ - -DBOOST_ROOT="${{ env.boost_path }}" \ - -DCMAKE_INSTALL_PREFIX="/usr" \ - -DTESTING=ON \ - -DVERBOSE_CONFIGURE=ON \ - -D${{ matrix.qbt_gui }} - cmake --build build --target qbt_update_translations - cmake --build build - cmake --build build --target check - DESTDIR="qbittorrent" cmake --install build - - - name: Run CodeQL analysis - uses: github/codeql-action/analyze@v3 - if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON') - with: - category: ${{ github.base_ref || github.ref_name }} - - - name: Prepare build artifacts - run: | - mkdir upload - mkdir upload/cmake - cp build/compile_commands.json upload/cmake - mkdir upload/cmake/libtorrent - cp ${{ env.libtorrent_path }}/build/compile_commands.json upload/cmake/libtorrent - - - name: Install AppImage - run: | - sudo apt install libfuse2 - curl \ - -L \ - -Z \ - -O https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-static-x86_64.AppImage \ - -O https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-static-x86_64.AppImage \ - -O https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage - chmod +x \ - linuxdeploy-static-x86_64.AppImage \ - linuxdeploy-plugin-qt-static-x86_64.AppImage \ - linuxdeploy-plugin-appimage-x86_64.AppImage - - - name: Prepare files for AppImage - if: matrix.qbt_gui == 'GUI=OFF' - run: | - mkdir -p qbittorrent/usr/share/applications - cp .github/workflows/helper/appimage/org.qbittorrent.qBittorrent.desktop qbittorrent/usr/share/applications/org.qbittorrent.qBittorrent.desktop - mkdir -p qbittorrent/usr/share/icons/hicolor/scalable/apps - cp dist/unix/menuicons/scalable/apps/qbittorrent.svg qbittorrent/usr/share/icons/hicolor/scalable/apps/qbittorrent.svg - - - name: Package AppImage - run: | - ./linuxdeploy-static-x86_64.AppImage --appdir qbittorrent --plugin qt - rm qbittorrent/apprun-hooks/* - cp .github/workflows/helper/appimage/export_vars.sh qbittorrent/apprun-hooks/export_vars.sh - NO_APPSTREAM=1 \ - OUTPUT=upload/qbittorrent-CI_Ubuntu_x86_64.AppImage \ - ./linuxdeploy-static-x86_64.AppImage --appdir qbittorrent --output appimage - - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: qBittorrent-CI_Ubuntu-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }} - path: upload diff --git a/.github/workflows/ci_windows.yaml b/.github/workflows/ci_windows.yaml index fa43a38cb247..35ae1bc7bb43 100644 --- a/.github/workflows/ci_windows.yaml +++ b/.github/workflows/ci_windows.yaml @@ -17,7 +17,8 @@ jobs: strategy: fail-fast: false matrix: - libt_version: ["2.0.10", "1.2.19"] + libt_version: ["RC_2_0", "RC_1_2"] + qt_version: ["6.8.1"] env: boost_path: "${{ github.workspace }}/../boost" @@ -78,7 +79,7 @@ jobs: - name: Install boost env: BOOST_MAJOR_VERSION: "1" - BOOST_MINOR_VERSION: "86" + BOOST_MINOR_VERSION: "87" BOOST_PATCH_VERSION: "0" run: | $boost_url="https://boostorg.jfrog.io/artifactory/main/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz" @@ -95,7 +96,9 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v4 with: - version: "6.8.0" + py7zrversion: '>=0.22.0' + aqtversion: '>=3.1.20' + version: ${{ matrix.qt_version }} arch: win64_msvc2022_64 archives: qtbase qtsvg qttools cache: true @@ -103,7 +106,7 @@ jobs: - name: Install libtorrent run: | git clone ` - --branch v${{ matrix.libt_version }} ` + --branch ${{ matrix.libt_version }} ` --depth 1 ` --recurse-submodules ` https://github.com/arvidn/libtorrent.git ` @@ -171,7 +174,7 @@ jobs: mkdir upload/qBittorrent/plugins/sqldrivers copy "${{ env.Qt_ROOT_DIR }}/plugins/sqldrivers/qsqlite.dll" upload/qBittorrent/plugins/sqldrivers mkdir upload/qBittorrent/plugins/styles - copy "${{ env.Qt_ROOT_DIR }}/plugins/styles/qmodernwindowsstyle.dll" upload/qBittorrent/plugins/styles + copy "${{ env.Qt_ROOT_DIR }}/plugins/styles/*style.dll" upload/qBittorrent/plugins/styles mkdir upload/qBittorrent/plugins/tls copy "${{ env.Qt_ROOT_DIR }}/plugins/tls/qschannelbackend.dll" upload/qBittorrent/plugins/tls # cmake additionals @@ -184,16 +187,5 @@ jobs: - name: Upload build artifacts uses: actions/upload-artifact@v4 with: - name: qBittorrent-CI_Windows-x64_libtorrent-${{ matrix.libt_version }} + name: qBittorrent-CI_Windows-x64_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }} path: upload - - - name: Create installer - run: | - 7z x -o"dist/windows/" "dist/windows/NSISPlugins.zip" - makensis /DQBT_DIST_DIR="../../upload/qBittorrent" /WX dist/windows/qbittorrent.nsi - - - name: Upload installer - uses: actions/upload-artifact@v4 - with: - name: qBittorrent-CI_Windows-x64_libtorrent-${{ matrix.libt_version }}-setup - path: dist/windows/qbittorrent_*_setup.exe diff --git a/.github/workflows/coverity-scan.yaml b/.github/workflows/coverity-scan.yaml deleted file mode 100644 index aaaefb5989a4..000000000000 --- a/.github/workflows/coverity-scan.yaml +++ /dev/null @@ -1,115 +0,0 @@ -name: Coverity Scan - -on: - schedule: - - cron: '0 0 1 * *' # Monthly (1st day of month at midnight) - workflow_dispatch: # Mainly for testing. Don't forget the Coverity usage limits. - -permissions: {} - -jobs: - coverity_scan: - name: Scan - runs-on: ubuntu-latest - - strategy: - matrix: - libt_version: ["2.0.10"] - qbt_gui: ["GUI=ON"] - qt_version: ["6.5.2"] - - env: - boost_path: "${{ github.workspace }}/../boost" - coverity_path: "${{ github.workspace }}/../coverity" - libtorrent_path: "${{ github.workspace }}/../libtorrent" - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - sudo apt update - sudo apt install \ - build-essential cmake ninja-build \ - libssl-dev libxkbcommon-x11-dev libxcb-cursor-dev zlib1g-dev - - - name: Install boost - env: - BOOST_MAJOR_VERSION: "1" - BOOST_MINOR_VERSION: "86" - BOOST_PATCH_VERSION: "0" - run: | - boost_url="https://boostorg.jfrog.io/artifactory/main/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz" - boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz" - set +e - curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url" - tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?" - if [ "$_exitCode" -ne "0" ]; then - curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2" - tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?" - fi - mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}" - - - name: Install Qt - uses: jurplel/install-qt-action@v4 - with: - version: ${{ matrix.qt_version }} - archives: icu qtbase qtdeclarative qtsvg qttools - cache: true - - - name: Install libtorrent - run: | - git clone \ - --branch v${{ matrix.libt_version }} \ - --depth 1 \ - --recurse-submodules \ - https://github.com/arvidn/libtorrent.git \ - ${{ env.libtorrent_path }} - cd ${{ env.libtorrent_path }} - cmake \ - -B build \ - -G "Ninja" \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DBOOST_ROOT="${{ env.boost_path }}" \ - -Ddeprecated-functions=OFF - cmake --build build - sudo cmake --install build - - - name: Download Coverity Build Tool - run: | - curl \ - -L \ - -d "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=qbittorrent%2FqBittorrent" \ - -o "${{ runner.temp }}/coverity_tool.tgz" \ - "https://scan.coverity.com/download/linux64" - mkdir -p ${{ env.coverity_path }} - tar \ - -xf "${{ runner.temp }}/coverity_tool.tgz" \ - -C "${{ env.coverity_path }}" \ - --strip-components 1 - - - name: Build qBittorrent - run: | - cmake \ - -B build \ - -G "Ninja" \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DBOOST_ROOT="${{ env.boost_path }}" \ - -DVERBOSE_CONFIGURE=ON \ - -D${{ matrix.qbt_gui }} - PATH="${{ env.coverity_path }}/bin:$PATH" \ - cov-build \ - --dir cov-int \ - cmake --build build - - - name: Submit the result to Coverity Scan - run: | - tar -caf qbittorrent.xz cov-int - curl \ - --form token="${{ secrets.COVERITY_SCAN_TOKEN }}" \ - --form email=sledgehammer999@qbittorrent.org \ - --form file=@qbittorrent.xz \ - --form version="$(git rev-parse --short HEAD)" \ - --form description="master" \ - https://scan.coverity.com/builds?project=qbittorrent%2FqBittorrent diff --git a/.github/workflows/stale_bot.yaml b/.github/workflows/stale_bot.yaml deleted file mode 100644 index 6cd7278557c5..000000000000 --- a/.github/workflows/stale_bot.yaml +++ /dev/null @@ -1,25 +0,0 @@ -name: Stale bot - -on: - schedule: - - cron: '0 0 * * *' - -permissions: - pull-requests: write - -jobs: - stale: - runs-on: ubuntu-latest - steps: - - name: Mark and close stale PRs - uses: actions/stale@v9 - with: - stale-pr-message: "This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity." - close-pr-message: "This PR was closed because it has been stalled for some time with no activity." - days-before-stale: -1 # avoid marking issues - days-before-pr-stale: 60 - days-before-close: -1 # avoid closing issues - days-before-pr-close: 7 - exempt-all-pr-assignees: true # avoid stale for all PR with assignees - exempt-all-pr-milestones: true # avoid stale for all PR with milestones - operations-per-run: 200 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a4c84ea2d418..815501f77a1b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - ts - repo: https://github.com/pre-commit/pre-commit-hooks.git - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-json name: Check JSON files @@ -82,7 +82,7 @@ repos: - ts - repo: https://github.com/crate-ci/typos.git - rev: v1.25.0 + rev: v1.28.2 hooks: - id: typos name: Check spelling (typos) diff --git a/CMakeLists.txt b/CMakeLists.txt index 86ede6b3cff8..9e3633d3d96b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16 FATAL_ERROR) # Policies <= CMP0097 default to NEW +cmake_minimum_required(VERSION 3.29.0 FATAL_ERROR) project(qBittorrent DESCRIPTION "The qBittorrent BitTorrent client" diff --git a/cmake/Modules/CommonConfig.cmake b/cmake/Modules/CommonConfig.cmake index b57dc4bcf914..5bab7deb262c 100644 --- a/cmake/Modules/CommonConfig.cmake +++ b/cmake/Modules/CommonConfig.cmake @@ -3,6 +3,7 @@ # to consume common compile options/definitions # treat value specified by the CXX_STANDARD target property as a requirement by default +set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/src/gui/properties/speedplotview.cpp b/src/gui/properties/speedplotview.cpp index 6fb78c95d24e..5d73a215a545 100644 --- a/src/gui/properties/speedplotview.cpp +++ b/src/gui/properties/speedplotview.cpp @@ -163,33 +163,33 @@ SpeedPlotView::SpeedPlotView(QWidget *parent) : QGraphicsView {parent} { QPen greenPen; - greenPen.setWidthF(1.5); - greenPen.setColor(QColor(134, 196, 63)); - QPen bluePen; - bluePen.setWidthF(1.5); - bluePen.setColor(QColor(50, 153, 255)); + greenPen.setWidthF(2); + greenPen.setColor(QColorConstants::Svg::green); + QPen royalbluePen; + royalbluePen.setWidthF(2); + royalbluePen.setColor(QColorConstants::Svg::royalblue); - m_properties[UP] = GraphProperties(tr("Total Upload"), bluePen); + m_properties[UP] = GraphProperties(tr("Total Upload"), royalbluePen); m_properties[DOWN] = GraphProperties(tr("Total Download"), greenPen); - bluePen.setStyle(Qt::DashLine); + royalbluePen.setStyle(Qt::DashLine); greenPen.setStyle(Qt::DashLine); - m_properties[PAYLOAD_UP] = GraphProperties(tr("Payload Upload"), bluePen); + m_properties[PAYLOAD_UP] = GraphProperties(tr("Payload Upload"), royalbluePen); m_properties[PAYLOAD_DOWN] = GraphProperties(tr("Payload Download"), greenPen); - bluePen.setStyle(Qt::DashDotLine); + royalbluePen.setStyle(Qt::DashDotLine); greenPen.setStyle(Qt::DashDotLine); - m_properties[OVERHEAD_UP] = GraphProperties(tr("Overhead Upload"), bluePen); + m_properties[OVERHEAD_UP] = GraphProperties(tr("Overhead Upload"), royalbluePen); m_properties[OVERHEAD_DOWN] = GraphProperties(tr("Overhead Download"), greenPen); - bluePen.setStyle(Qt::DashDotDotLine); + royalbluePen.setStyle(Qt::DashDotDotLine); greenPen.setStyle(Qt::DashDotDotLine); - m_properties[DHT_UP] = GraphProperties(tr("DHT Upload"), bluePen); + m_properties[DHT_UP] = GraphProperties(tr("DHT Upload"), royalbluePen); m_properties[DHT_DOWN] = GraphProperties(tr("DHT Download"), greenPen); - bluePen.setStyle(Qt::DotLine); + royalbluePen.setStyle(Qt::DotLine); greenPen.setStyle(Qt::DotLine); - m_properties[TRACKER_UP] = GraphProperties(tr("Tracker Upload"), bluePen); + m_properties[TRACKER_UP] = GraphProperties(tr("Tracker Upload"), royalbluePen); m_properties[TRACKER_DOWN] = GraphProperties(tr("Tracker Download"), greenPen); } @@ -322,7 +322,7 @@ void SpeedPlotView::paintEvent(QPaintEvent *) QPen gridPen; gridPen.setStyle(Qt::DashLine); gridPen.setWidthF(1); - gridPen.setColor(QColor(128, 128, 128, 128)); + gridPen.setColor(QColorConstants::Svg::grey); painter.setPen(gridPen); painter.drawLine(fullRect.left(), rect.top(), rect.right(), rect.top()); diff --git a/src/gui/statusbar.cpp b/src/gui/statusbar.cpp index 9f40708087cb..5e5f9bf7c8d4 100644 --- a/src/gui/statusbar.cpp +++ b/src/gui/statusbar.cpp @@ -76,7 +76,7 @@ StatusBar::StatusBar(QWidget *parent) m_dlSpeedLbl->setFocusPolicy(Qt::NoFocus); m_dlSpeedLbl->setCursor(Qt::PointingHandCursor); m_dlSpeedLbl->setStyleSheet(u"text-align:left;"_s); - m_dlSpeedLbl->setMinimumWidth(200); + m_dlSpeedLbl->setFixedWidth(300); m_upSpeedLbl = new QPushButton(this); m_upSpeedLbl->setIcon(UIThemeManager::instance()->getIcon(u"upload"_s, u"seeding"_s)); @@ -85,7 +85,7 @@ StatusBar::StatusBar(QWidget *parent) m_upSpeedLbl->setFocusPolicy(Qt::NoFocus); m_upSpeedLbl->setCursor(Qt::PointingHandCursor); m_upSpeedLbl->setStyleSheet(u"text-align:left;"_s); - m_upSpeedLbl->setMinimumWidth(200); + m_upSpeedLbl->setFixedWidth(300); m_lastExternalIPsLbl = new QLabel(tr("External IP: N/A")); m_lastExternalIPsLbl->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); diff --git a/src/gui/transferlistmodel.cpp b/src/gui/transferlistmodel.cpp index 7c827c1a6a84..b81ab94e7180 100644 --- a/src/gui/transferlistmodel.cpp +++ b/src/gui/transferlistmodel.cpp @@ -94,12 +94,12 @@ TransferListModel::TransferListModel(QObject *parent) , m_statusStrings { {BitTorrent::TorrentState::Downloading, tr("Downloading")}, - {BitTorrent::TorrentState::StalledDownloading, tr("Stalled", "Torrent is waiting for download to begin")}, + {BitTorrent::TorrentState::StalledDownloading, tr("Stalled Downloading", "Torrent is waiting for download to begin")}, {BitTorrent::TorrentState::DownloadingMetadata, tr("Downloading metadata", "Used when loading a magnet link")}, {BitTorrent::TorrentState::ForcedDownloadingMetadata, tr("[F] Downloading metadata", "Used when forced to load a magnet link. You probably shouldn't translate the F.")}, {BitTorrent::TorrentState::ForcedDownloading, tr("[F] Downloading", "Used when the torrent is forced started. You probably shouldn't translate the F.")}, {BitTorrent::TorrentState::Uploading, tr("Seeding", "Torrent is complete and in upload-only mode")}, - {BitTorrent::TorrentState::StalledUploading, tr("Seeding", "Torrent is complete and in upload-only mode")}, + {BitTorrent::TorrentState::StalledUploading, tr("Stalled Uploading", "Torrent is complete and in upload-only mode")}, {BitTorrent::TorrentState::ForcedUploading, tr("[F] Seeding", "Used when the torrent is forced started. You probably shouldn't translate the F.")}, {BitTorrent::TorrentState::QueuedDownloading, tr("Queued", "Torrent is queued")}, {BitTorrent::TorrentState::QueuedUploading, tr("Queued", "Torrent is queued")}, @@ -549,7 +549,7 @@ QVariant TransferListModel::data(const QModelIndex &index, const int role) const case AdditionalUnderlyingDataRole: return internalValue(torrent, index.column(), true); case Qt::DecorationRole: - if (index.column() == TR_NAME) + if (index.column() == TR_STATUS) return getIconByState(torrent->state()); break; case Qt::ToolTipRole: