From 202a6283acff4905067254c0809ab6a8e28a8ddd Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 21 Aug 2021 22:31:38 +0300 Subject: [PATCH] kget: do not post events for UI-related torrent status changes Signed-off-by: Ivailo Monev --- kget/transfer-plugins/torrent/transferTorrent.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kget/transfer-plugins/torrent/transferTorrent.cpp b/kget/transfer-plugins/torrent/transferTorrent.cpp index 6bb49827..fb719f08 100644 --- a/kget/transfer-plugins/torrent/transferTorrent.cpp +++ b/kget/transfer-plugins/torrent/transferTorrent.cpp @@ -510,7 +510,7 @@ void TransferTorrent::start() ltparams.file_priorities = m_priorities; #else std::vector priorities; - for (const boost::uint8_t priority: m_priorities) { + foreach (const boost::uint8_t priority, m_priorities) { priorities.push_back(lt::download_priority_t(priority)); } ltparams.file_priorities = priorities; @@ -720,12 +720,12 @@ void TransferTorrent::timerEvent(QTimerEvent *event) case lt::torrent_status::checking_files: case lt::torrent_status::checking_resume_data: { setStatus(Job::Running, i18n("Checking...")); - setTransferChange(Transfer::Tc_Status, true); + setTransferChange(Transfer::Tc_Status, false); break; } case lt::torrent_status::allocating: { setStatus(Job::Running, i18n("Allocating disk space...")); - setTransferChange(Transfer::Tc_Status, true); + setTransferChange(Transfer::Tc_Status, false); break; } case lt::torrent_status::finished: @@ -737,7 +737,7 @@ void TransferTorrent::timerEvent(QTimerEvent *event) case lt::torrent_status::downloading_metadata: case lt::torrent_status::downloading: { setStatus(Job::Running); - setTransferChange(Transfer::Tc_Status, true); + setTransferChange(Transfer::Tc_Status, false); break; } } -- 2.11.0