From d26e582cc185889d82d00fabbf39d54d2f02e9ec Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 7 Mar 2022 13:38:20 +0800 Subject: [PATCH 1/3] Disable performance alert The alert is too annoying and there is no control knob for tuning it, so disable it in v4_4_x branch. Closes #16462. --- src/base/bittorrent/session.cpp | 4 ---- src/base/bittorrent/torrentimpl.cpp | 9 --------- src/base/bittorrent/torrentimpl.h | 1 - 3 files changed, 14 deletions(-) diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index 5f27f4437..508b560c1 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -1069,7 +1069,6 @@ void Session::initializeNativeSession() | lt::alert::file_progress_notification | lt::alert::ip_block_notification | lt::alert::peer_notification - | lt::alert::performance_warning | lt::alert::port_mapping_notification | lt::alert::status_notification | lt::alert::storage_notification @@ -4652,9 +4651,6 @@ void Session::handleAlert(const lt::alert *a) case lt::fastresume_rejected_alert::alert_type: case lt::torrent_checked_alert::alert_type: case lt::metadata_received_alert::alert_type: - case lt::performance_alert::alert_type: - dispatchTorrentAlert(a); - break; case lt::state_update_alert::alert_type: handleStateUpdateAlert(static_cast(a)); break; diff --git a/src/base/bittorrent/torrentimpl.cpp b/src/base/bittorrent/torrentimpl.cpp index 3ea3326ff..f2c03abcd 100644 --- a/src/base/bittorrent/torrentimpl.cpp +++ b/src/base/bittorrent/torrentimpl.cpp @@ -1967,12 +1967,6 @@ void TorrentImpl::handleMetadataReceivedAlert(const lt::metadata_received_alert m_session->handleTorrentNeedSaveResumeData(this); } -void TorrentImpl::handlePerformanceAlert(const lt::performance_alert *p) const -{ - LogMsg((tr("Performance alert: ") + QString::fromStdString(p->message())) - , Log::INFO); -} - void TorrentImpl::handleCategoryOptionsChanged() { if (m_useAutoTMM) @@ -2040,9 +2034,6 @@ void TorrentImpl::handleAlert(const lt::alert *a) case lt::torrent_checked_alert::alert_type: handleTorrentCheckedAlert(static_cast(a)); break; - case lt::performance_alert::alert_type: - handlePerformanceAlert(static_cast(a)); - break; } } diff --git a/src/base/bittorrent/torrentimpl.h b/src/base/bittorrent/torrentimpl.h index d84020406..764251511 100644 --- a/src/base/bittorrent/torrentimpl.h +++ b/src/base/bittorrent/torrentimpl.h @@ -254,7 +254,6 @@ namespace BitTorrent void handleFileRenamedAlert(const lt::file_renamed_alert *p); void handleFileRenameFailedAlert(const lt::file_rename_failed_alert *p); void handleMetadataReceivedAlert(const lt::metadata_received_alert *p); - void handlePerformanceAlert(const lt::performance_alert *p) const; void handleSaveResumeDataAlert(const lt::save_resume_data_alert *p); void handleSaveResumeDataFailedAlert(const lt::save_resume_data_failed_alert *p); void handleTorrentCheckedAlert(const lt::torrent_checked_alert *p); From 51cb3ca0c833b7fb144c9ec99ff65e2fbc0a6b6e Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sat, 26 Feb 2022 14:17:38 +0800 Subject: [PATCH 2/3] GHA CI: install boost library manually libtorrent 2.0.5 has build issues with boost >= 1.78. --- .github/workflows/ci_macos.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml index 287a1b9fe..d83f0b78b 100644 --- a/.github/workflows/ci_macos.yaml +++ b/.github/workflows/ci_macos.yaml @@ -17,6 +17,7 @@ jobs: qt_version: "6.2.0" env: + boost_path: "${{ github.workspace }}/../boost" openssl_root: /usr/local/opt/openssl@1.1 steps: @@ -28,13 +29,22 @@ jobs: brew update > /dev/null brew install \ cmake ninja \ - boost openssl@1.1 zlib + openssl@1.1 zlib - name: Setup ccache uses: Chocobo1/setup-ccache-action@v1 with: update_packager_index: false + - name: Install boost + run: | + curl \ + -L \ + -o "${{ runner.temp }}/boost.tar.bz2" \ + "https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.bz2" + tar -xf "${{ runner.temp }}/boost.tar.bz2" -C "${{ github.workspace }}/.." + mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}" + - name: Install Qt uses: jurplel/install-qt-action@v2 with: @@ -54,6 +64,7 @@ jobs: -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ + -DBOOST_ROOT="${{ env.boost_path }}" \ -Ddeprecated-functions=OFF \ -DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" cmake --build build @@ -68,6 +79,7 @@ jobs: -G "Ninja" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ + -DBOOST_ROOT="${{ env.boost_path }}" \ -DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" \ -DVERBOSE_CONFIGURE=ON \ -D${{ matrix.qbt_gui }} @@ -82,6 +94,7 @@ jobs: -G "Ninja" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ + -DBOOST_ROOT="${{ env.boost_path }}" \ -DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" \ -DQT6=ON \ -DVERBOSE_CONFIGURE=ON \ From 97ead6d7c96e978cfee90cf2e70f6d280358293d Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 27 Feb 2022 15:35:41 +0800 Subject: [PATCH 3/3] GHA CI: disable uploading built artifacts for macOS The binary aren't usable universally because users are required to install related libraries. --- .github/workflows/ci_macos.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml index d83f0b78b..692dc3384 100644 --- a/.github/workflows/ci_macos.yaml +++ b/.github/workflows/ci_macos.yaml @@ -104,7 +104,6 @@ jobs: - name: Prepare build artifacts run: | mkdir upload - mv build/qbittorrent*.app upload mkdir upload/cmake cp build/compile_commands.json upload/cmake mkdir upload/cmake/libtorrent @@ -113,5 +112,5 @@ jobs: - name: Upload build artifacts uses: actions/upload-artifact@v2 with: - name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }} + name: build-info_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }} path: upload