Commit Graph

374 Commits

Author SHA1 Message Date
Yat Ho ed4fad9b18
feat: support creating 0 byte files (#6232) 2023-11-28 10:51:13 -06:00
Charles Kerr 1ec6b2b232
refactor: make more tr_torrent fields private (#6305)
* refactor: make tr_torrent::max_connected_peers_ private

* refactor: make tr_torrent::completeness_ private

* refactor: make tr_torrent::mark_edited() private

* refactor: make tr_torrent::mark_changed() private

* refactor: make tr_torrent::start_when_stable_ private

* refactor: make tr_torrent::is_dirty() private

* refactor: make tr_torrent::byte_span() private

* refactor: remove unused non-const version of tr_torrent::metainfo()

* refactor: make tr_torrent::set_dirty() private

* refactor: remove unused tr_torrentStartMagnet()
2023-11-27 23:04:04 -06:00
Charles Kerr b00b8dd2fb
refactor: make tr_torrent::on_announce_list_changed() private (#6304) 2023-11-27 16:42:31 -06:00
Charles Kerr 777bdfecf1
refactor: make tr_torrent::queue_position_ private (#6301) 2023-11-27 01:27:57 -06:00
Charles Kerr e14806c409
refactor: c++ify libtransmission's tr_ctor struct (#6295) 2023-11-26 15:43:37 -06:00
Charles Kerr a12ef941e7
refactor: make tr_torrent fields, methods private where possible (#6293) 2023-11-25 20:00:20 -06:00
Yat Ho 7af71d9695
refactor: pause torrent after verifying if files disappeared (#6277) 2023-11-25 16:20:17 -06:00
Charles Kerr d8c2074cb7
refactor: make tr_torrent date fields private (#6281) 2023-11-23 19:52:53 -06:00
Charles Kerr 7e8eca0e96
refactor: make tr_torrent::seconds_[seeding,downloading] private (#6279) 2023-11-22 23:41:12 -06:00
Charles Kerr 65d8ae5357
refactor: add a tr_direction arg to tr_torrent::is_queued() (#6263) 2023-11-16 23:55:29 -06:00
Charles Kerr 76521a1751
refactor: Values pt. 7 - remove tr_formatter_init methods (#6258)
* refactor: initialize libtransmission::Values units in Application::initUnits()

* refactor: use libtransmission::Values instead of Formatter::unitStr()

* refactor: remove Formatter::Size, Formatter:Type

* refactor: use Values::Config to init units in transmission-qt

* refactor: use Values::Config to init units in transmission-mac

* chore: remove unused tr_formatter_foo_init() functions

* chore: make Value::operator+() const

* use Values::Speed, Values::Storage in GTK client

* chore: use snake_case for Formatter methods

* refactor: use Values::Speed in GTK client details dialog

* feat: add Values::Value::is_zero()

* refactor: remove unnecessary UTF8String calls
2023-11-15 22:15:40 -06:00
Charles Kerr f8c544397a
refactor: add private helper class CumulativeCount (#6260)
* refactor: CumulativeCounts helper class

* refactor: add private CumulativeCounts helper class for tr_torrent
2023-11-15 18:53:43 -06:00
Charles Kerr ad63c7d77f
refactor: make some tr_torrent fields private (#6259)
* refactor: make tr_torrent::is_stopping_ private

* refactor: make tr_torrent::is_queued_ private

* refactor: make tr_torrent::is_dirty_ private

* refactor: make tr_torrent::is_deleting_ private

* refactor: make tr_torrent::obfuscated_hash_ private

* refactor: demeter
2023-11-15 16:24:33 -06:00
Charles Kerr 0e85befc0f
refactor: Values pt. 3 - use Speed in tr_session (#6235) 2023-11-12 12:30:37 -06:00
Charles Kerr a575be778f
refactor: Values pt. 2 - use Speed in tr_bandwidth (#6234) 2023-11-10 17:12:24 -06:00
Yat Ho a2e97234d2
refactor: optionally include 0 byte files when computing file offset (#6229) 2023-11-09 16:49:18 -06:00
Charles Kerr 089c438512
ci: bump macos-11 to macos-12 in github actions (#6203) 2023-11-04 12:33:25 -05:00
Charles Kerr a952a0731f
refactor: remove the tr_error** idiom (#6198)
* refactor: remove the tr_error** idiom

* fix: tr_error::message() is only constexpr in c++20 and up

* chore: silence a couple of g++-12 Wshadow warnings
2023-11-04 11:39:41 -05:00
Yat Ho a2b547fb50
chore: iwyu (#6201) 2023-11-03 12:03:26 -05:00
Julien 8ac323d5d6
chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
Charles Kerr e27b05bcec
refactor: make class methods private (#6181) 2023-10-30 02:32:29 -04:00
Charles Kerr 237223aeaf
refactor: prefer std::set over QSet (#5703)
* refactor: use std::set instead of QSet in WatchDir.cc

* refactor: use std::set instead of QSet in FileTreeView.cc

* refactor: use std::set instead of QSet in ColumnResizer.cc

* refactor: use std::set instead of QSet in Prefs.cc

* chore: fix rebase error that changed libsmall snapshot

* refactor: more replace QSet with std::set
2023-10-24 21:14:37 -04:00
Charles Kerr 69b293a793
refactor: minor decoupling in peer-mgr (#6155)
* refactor: minor decoupling in peer-mgr

Pass a tr_torrents& and TimerMaker& into the tr_peerMgr and HandshakeMediator
constructors so they can be used directly instead of via tr_session.

No functional changes.

* refactor: in HandshakeMediator, make the session reference const
2023-10-24 15:24:52 -04:00
Charles Kerr 735639c5c7
refactor: make tr_torrent::labels_ private (#6153) 2023-10-23 18:11:28 -04:00
Charles Kerr 682e4f2c2b
refactor: make tr_torrent::any_date_ private (#6148) 2023-10-21 23:23:08 -04:00
Charles Kerr 8f7330523c
chore: remove unused progress arg from tr_torrentSetLocation() (#6147) 2023-10-21 22:33:41 -04:00
Charles Kerr 0457dcb6a8
refactor: make tr_torrent::files_wanted_ private (#6146) 2023-10-21 13:21:05 -05:00
Charles Kerr 8c1291ce8a
refactor: make tr_torrent::unique_id_ private (#6145) 2023-10-20 21:23:14 -05:00
Charles Kerr 9e5c528056
refactor: add tr_torrent::stat() (#6143) 2023-10-20 20:35:59 -05:00
Charles Kerr 4bdb3066d8
refactor: decouple tr_verify_worker from tr_torrent (#6123) 2023-10-19 08:39:34 -05:00
Charles Kerr db96771c80
refactor: add tr_torrent::Error helper class (#6077) 2023-10-08 21:33:34 -05:00
Charles Kerr ce39b01dd2
perf: reduce unnecessary size overhead in tr_torrent struct (#6073) 2023-10-04 21:38:14 -05:00
Charles Kerr 3f7340502f
refactor: add a SimpleSmoothedSpeed helper class (#6072) 2023-10-04 17:40:46 -05:00
Yat Ho 93e8bf7330
fixup! refactor: make tr_torrent idle fields private (#6070) (#6074)
Thanks!
2023-10-04 16:33:04 -05:00
Charles Kerr 68f3c89e3c
refactor: make tr_torrent idle fields private (#6070) 2023-10-03 20:18:55 -05:00
Charles Kerr 917c00e477
refactor: remove tr_torrentStatCached() (#6066) 2023-10-02 14:07:28 -05:00
tearfur 31f2c7aa29
refactor: `tr_torrent.incompleteMetadata` from raw pointer to `std::optional` (#5791) 2023-07-15 15:38:38 -05:00
tearfur ca4cb1a675
fix/cleanups to tr_peerMsgsImpl (#5783)
* fix: correct condition to advertise pex support in ltep handshake

1. Advertise pex support regardless of whether the peer had advertised pex support. No reason to give up an opportunity to advertise pex support just because our direct peer does not support it.
2. Check if pex is enabled in global settings as well.
2023-07-14 10:51:52 -05:00
Charles Kerr 5b38e819da
perf: minor cleanups (#5728)
* refactor: in torrent_metainfo.is_private(), cheaper to return a bool than a bool const&

* refactor: in tr_torrent::id(), cheaper to return an int than an int const&

* refactor: in tr_metainfo_builder.is_private(), cheaper to return a bool than a bool const&

* refactor: break peer_atom.flags2 into separate bools
2023-07-04 19:47:51 -05:00
Charles Kerr 56b27057fd
refactor: add lightweight observable / observer for decoupling (#5716) 2023-07-04 15:47:18 -05:00
Charles Kerr 0d3b321bac
refactor: use snake_case for libtransmission class methods (#5497) 2023-05-05 23:11:05 -05:00
Charles Kerr 9d2507c7e3
refactor: snake_case in libtransmission class methods (#5428) 2023-04-22 20:25:55 -05:00
Pierre Dubouilh ebfba686b0
feat: sequential download (#4795) 2023-04-14 11:47:54 -05:00
Charles Kerr 5cc3bf8a97
fix: generate peer-id on launch (#5233) 2023-03-15 20:53:48 -05:00
Charles Kerr b354337720
ci: check for clang tidy errors in libtransmission (#5188) 2023-03-10 00:23:22 -06:00
Cœur 63653b4831
fix: recheckCompleteness on setDownloadDir (#5060) 2023-02-28 08:51:11 -06:00
Charles Kerr f551b4adbf
fix: magnet links are always paused when added (#4856) 2023-02-13 12:33:33 -06:00
Julien 4b8cfa2e57
chore: update copyrights to 2023 (#4834) 2023-02-11 14:49:42 -06:00
SweetPPro 1e988c9ce4
fix magnet link start logic (#4528) 2023-02-02 00:19:20 -06:00
Charles Kerr 724a0f48f0
fix: clang-tidy header warnings (#4686) 2023-01-28 17:58:20 -06:00