From 1d04cc0896db42f66543e06bd9be872ad0d370da Mon Sep 17 00:00:00 2001 From: xavier2k6 <42386382+xavier2k6@users.noreply.github.com> Date: Mon, 4 Jul 2022 13:12:35 +0100 Subject: [PATCH] Use latest dependencies --- .github/workflows/ci_file_health.yaml | 2 +- .github/workflows/ci_macos.yaml | 149 --------------- .github/workflows/ci_ubuntu.yaml | 170 ------------------ .github/workflows/ci_windows.yaml | 11 +- .github/workflows/coverity-scan.yaml | 115 ------------ .../workflows/helper/pre-commit/.typos.toml | 2 + .github/workflows/stale_bot.yaml | 25 --- .pre-commit-config.yaml | 8 +- CMakeLists.txt | 2 +- cmake/Modules/CommonConfig.cmake | 1 + doc/en/qbittorrent-nox.1 | 41 +++-- doc/en/qbittorrent.1 | 31 ++-- doc/ru/qbittorrent-nox.1 | 11 +- doc/ru/qbittorrent.1 | 9 +- src/gui/properties/speedplotview.cpp | 30 ++-- src/gui/statusbar.cpp | 4 +- src/gui/transferlistmodel.cpp | 6 +- 17 files changed, 88 insertions(+), 529 deletions(-) delete mode 100644 .github/workflows/ci_macos.yaml delete mode 100644 .github/workflows/ci_ubuntu.yaml delete mode 100644 .github/workflows/coverity-scan.yaml delete mode 100644 .github/workflows/stale_bot.yaml diff --git a/.github/workflows/ci_file_health.yaml b/.github/workflows/ci_file_health.yaml index 76b358263e04..bfad2f3ffd5c 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.1.7/pandoc-3.1.7-linux-amd64.tar.gz" + "https://github.com/jgm/pandoc/releases/download/3.4/pandoc-3.4-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 e94c96d5d36c..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 -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 172876852e62..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 }} -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 f4cd316e4dcf..0d064aa38671 100644 --- a/.github/workflows/ci_windows.yaml +++ b/.github/workflows/ci_windows.yaml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - libt_version: ["2.0.10", "1.2.19"] + libt_version: ["RC_2_0"] env: boost_path: "${{ github.workspace }}/../boost" @@ -95,14 +95,17 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v4 with: - version: "6.7.0" + py7zrversion: '>=0.22.0' + aqtversion: '>=3.1.18' + version: '6.8.0' + arch: win64_msvc2022_64 archives: qtbase qtsvg qttools cache: true - 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 ` @@ -170,7 +173,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 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/helper/pre-commit/.typos.toml b/.github/workflows/helper/pre-commit/.typos.toml index 0f33373ade21..90d6e1746af7 100644 --- a/.github/workflows/helper/pre-commit/.typos.toml +++ b/.github/workflows/helper/pre-commit/.typos.toml @@ -16,3 +16,5 @@ ths = "ths" [default.extend-words] BA = "BA" helo = "helo" +Pn = "Pn" +UIU = "UIU" 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 504c83adae11..61725fce1c6b 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.5.0 + rev: v4.6.0 hooks: - id: check-json name: Check JSON files @@ -63,11 +63,11 @@ repos: - ts - repo: https://github.com/codespell-project/codespell.git - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell name: Check spelling (codespell) - args: ["--ignore-words-list", "additionals,curren,fo,ist,ket,searchin,superseeding,te,ths"] + args: ["--ignore-words-list", "additionals,categor,curren,fo,ist,ket,notin,searchin,sectionin,superseeding,te,ths"] exclude: | (?x)^( .*\.desktop | @@ -84,7 +84,7 @@ repos: - ts - repo: https://github.com/crate-ci/typos.git - rev: v1.16.18 + rev: v1.24.6 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/doc/en/qbittorrent-nox.1 b/doc/en/qbittorrent-nox.1 index 7d1ee0dd173d..140ad389cac5 100644 --- a/doc/en/qbittorrent-nox.1 +++ b/doc/en/qbittorrent-nox.1 @@ -1,41 +1,44 @@ -.\" Automatically generated by Pandoc 3.1.7 +.\" Automatically generated by Pandoc 3.4 .\" -.TH "QBITTORRENT-NOX" "1" "January 16th 2010" "Command line Bittorrent client written in C++ / Qt" "" +.TH "QBITTORRENT\-NOX" "1" "January 16th 2010" "Command line Bittorrent client written in C++ / Qt" .SH NAME -qBittorrent-nox - a command line Bittorrent client written in C++ / Qt +qBittorrent\-nox \- a command line Bittorrent client written in C++ / Qt .SH SYNOPSIS -\f[B]qbittorrent-nox\f[R] -\f[CR][--d|--daemon] [--webui-port=x] [TORRENT_FILE | URL]...\f[R] +\f[B]qbittorrent\-nox\f[R] +\f[CR][\-\-d|\-\-daemon] [\-\-webui\-port=x] [TORRENT_FILE | URL]...\f[R] .PP -\f[B]qbittorrent-nox\f[R] \f[CR]--help\f[R] +\f[B]qbittorrent\-nox\f[R] \f[CR]\-\-help\f[R] .PP -\f[B]qbittorrent-nox\f[R] \f[CR]--version\f[R] +\f[B]qbittorrent\-nox\f[R] \f[CR]\-\-version\f[R] .SH DESCRIPTION -\f[B]qBittorrent-nox\f[R] is an advanced command-line Bittorrent client -written in C++ / Qt using the \f[B]libtorrent-rasterbar\f[R] library by -Arvid Norberg. -qBittorrent-nox aims to be a good alternative to other command line +\f[B]qBittorrent\-nox\f[R] is an advanced command\-line Bittorrent +client written in C++ / Qt using the \f[B]libtorrent\-rasterbar\f[R] +library by Arvid Norberg. +qBittorrent\-nox aims to be a good alternative to other command line bittorrent clients and provides features similar to popular graphical clients. .PP -qBittorrent-nox is fast, stable, light and it supports unicode. -It also comes with UPnP port forwarding / NAT-PMP, encryption (Vuze +qBittorrent\-nox is fast, stable, light and it supports unicode. +It also comes with UPnP port forwarding / NAT\-PMP, encryption (Vuze compatible), FAST extension (mainline) and PeX support (utorrent compatible). .PP -qBittorrent-nox is meant to be controlled via its feature-rich Web UI +qBittorrent\-nox is meant to be controlled via its feature\-rich Web UI which is accessible as a default on http://localhost:8080. The Web UI access is secured and the default account user name is \[lq]admin\[rq] with \[lq]adminadmin\[rq] as a password. .SH OPTIONS -\f[B]\f[CB]--help\f[B]\f[R] Prints the command line options. +\f[B]\f[CB]\-\-help\f[B]\f[R] Prints the command line options. .PP -\f[B]\f[CB]--version\f[B]\f[R] Prints qbittorrent program version +\f[B]\f[CB]\-\-version\f[B]\f[R] Prints qbittorrent program version number. .PP -\f[B]\f[CB]--webui-port=x\f[B]\f[R] Changes Web UI port to x (default: -8080). +\f[B]\f[CB]\-\-webui\-port=x\f[B]\f[R] Changes Web UI port to x +(default: 8080). .SH BUGS If you find a bug, please report it at https://bugs.qbittorrent.org .SH AUTHORS -Christophe Dumez . +Christophe Dumez \c +.MT chris@qbittorrent.org +.ME \c +\&. diff --git a/doc/en/qbittorrent.1 b/doc/en/qbittorrent.1 index 4efca9e0d32b..c8737d286d32 100644 --- a/doc/en/qbittorrent.1 +++ b/doc/en/qbittorrent.1 @@ -1,35 +1,38 @@ -.\" Automatically generated by Pandoc 3.1.7 +.\" Automatically generated by Pandoc 3.4 .\" -.TH "QBITTORRENT" "1" "January 16th 2010" "Bittorrent client written in C++ / Qt" "" +.TH "QBITTORRENT" "1" "January 16th 2010" "Bittorrent client written in C++ / Qt" .SH NAME -qBittorrent - a Bittorrent client written in C++ / Qt +qBittorrent \- a Bittorrent client written in C++ / Qt .SH SYNOPSIS \f[B]qbittorrent\f[R] -\f[CR][--no-splash] [--webui-port=x] [TORRENT_FILE | URL]...\f[R] +\f[CR][\-\-no\-splash] [\-\-webui\-port=x] [TORRENT_FILE | URL]...\f[R] .PP -\f[B]qbittorrent\f[R] \f[CR]--help\f[R] +\f[B]qbittorrent\f[R] \f[CR]\-\-help\f[R] .PP -\f[B]qbittorrent\f[R] \f[CR]--version\f[R] +\f[B]qbittorrent\f[R] \f[CR]\-\-version\f[R] .SH DESCRIPTION \f[B]qBittorrent\f[R] is an advanced Bittorrent client written in C++ / -Qt, using the \f[B]libtorrent-rasterbar\f[R] library by Arvid Norberg. +Qt, using the \f[B]libtorrent\-rasterbar\f[R] library by Arvid Norberg. qBittorrent is similar to uTorrent. qBittorrent is fast, stable, light, it supports unicode and it provides a good integrated search engine. -It also comes with UPnP port forwarding / NAT-PMP, encryption (Vuze +It also comes with UPnP port forwarding / NAT\-PMP, encryption (Vuze compatible), FAST extension (mainline) and PeX support (utorrent compatible). .SH OPTIONS -\f[B]\f[CB]--help\f[B]\f[R] Prints the command line options. +\f[B]\f[CB]\-\-help\f[B]\f[R] Prints the command line options. .PP -\f[B]\f[CB]--version\f[B]\f[R] Prints qbittorrent program version +\f[B]\f[CB]\-\-version\f[B]\f[R] Prints qbittorrent program version number. .PP -\f[B]\f[CB]--no-splash\f[B]\f[R] Disables splash screen on startup. +\f[B]\f[CB]\-\-no\-splash\f[B]\f[R] Disables splash screen on startup. .PP -\f[B]\f[CB]--webui-port=x\f[B]\f[R] Changes Web UI port to x (default: -8080). +\f[B]\f[CB]\-\-webui\-port=x\f[B]\f[R] Changes Web UI port to x +(default: 8080). .SH BUGS If you find a bug, please report it at https://bugs.qbittorrent.org .SH AUTHORS -Christophe Dumez . +Christophe Dumez \c +.MT chris@qbittorrent.org +.ME \c +\&. diff --git a/doc/ru/qbittorrent-nox.1 b/doc/ru/qbittorrent-nox.1 index ba8713bae179..315753991b6e 100644 --- a/doc/ru/qbittorrent-nox.1 +++ b/doc/ru/qbittorrent-nox.1 @@ -1,7 +1,10 @@ -.\" Automatically generated by Pandoc 3.1.7 +.\" Automatically generated by Pandoc 3.4 .\" -.TH "QBITTORRENT-NOX" "1" "16 января 2010" "Клиент сети БитТоррент для командной строки" "" +.TH "QBITTORRENT\-NOX" "1" "16 января 2010" "Клиент сети БитТоррент для командной строки" .SH НАЗВАНИЕ -qBittorrent-nox \[em] клиент сети БитТоррент для командной строки. +qBittorrent\-nox \[em] клиент сети БитТоррент для командной строки. .SH АВТОРЫ -Christophe Dumez . +Christophe Dumez \c +.MT chris@qbittorrent.org +.ME \c +\&. diff --git a/doc/ru/qbittorrent.1 b/doc/ru/qbittorrent.1 index 2fc395ddde45..7820ac39894c 100644 --- a/doc/ru/qbittorrent.1 +++ b/doc/ru/qbittorrent.1 @@ -1,7 +1,10 @@ -.\" Automatically generated by Pandoc 3.1.7 +.\" Automatically generated by Pandoc 3.4 .\" -.TH "QBITTORRENT" "1" "16 января 2010" "Клиент сети БитТоррент" "" +.TH "QBITTORRENT" "1" "16 января 2010" "Клиент сети БитТоррент" .SH НАЗВАНИЕ qBittorrent \[em] клиент сети БитТоррент. .SH АВТОРЫ -Christophe Dumez . +Christophe Dumez \c +.MT chris@qbittorrent.org +.ME \c +\&. 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 8eef15e7baf2..66e142c937ad 100644 --- a/src/gui/statusbar.cpp +++ b/src/gui/statusbar.cpp @@ -75,7 +75,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)); @@ -84,7 +84,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_DHTLbl = new QLabel(tr("DHT: %1 nodes").arg(0), this); m_DHTLbl->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); diff --git a/src/gui/transferlistmodel.cpp b/src/gui/transferlistmodel.cpp index 8263a3b6d90c..5c84008e27e2 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: