Commit Graph

16651 Commits

Author SHA1 Message Date
Yat Ho
e687db8f26 build: support building with system utf8cpp (#8191) 2026-01-28 15:33:50 -06:00
Charles Kerr
7559f7ffca refactor: C++ify tr_torrentPeers() (#8253)
* refactor: tr_torrentPeers() now returns a std::vector<tr_peer_stat>

* refactor: make tr_peer_stat.client a std::string_view

* refactor: make tr_peer_stat.flag_str a std::string

* refactor: make tr_peer_stat.addr a std::string

* refactor: rename tr_peer_stat field names to camel_case

* refactor: use Speed type for tr_peer_stat speed fields

* refactor: add default initializers to tr_peer_stat fields

* refactor: order tr_peer_stat fields to reduce padding

* fix: typo in [Torrent peers] getter

* refactor: make tr_peer_stat.user_agent a std::string

* refactor: pass by reference instead of by pointer in DetailsDialog

* fixup! refactor: add default initializers to tr_peer_stat fields
2026-01-28 15:16:12 -06:00
Yat Ho
63d6d670fd fix: some errors are not returned in tr_sys_path_get_capacity() (#8248)
* fix: some errors are not returned in `tr_sys_path_get_capacity()`

* test: disable well-formed free_space tests

There are no reliable way to test them.
2026-01-28 13:14:44 -06:00
Yat Ho
b68fc15eb0 fix: FTBFS on MSVC Qt5 (#8246) 2026-01-28 13:13:55 -06:00
Yat Ho
6544bb1675 docs: fix leftover camelCase string references (#8242) 2026-01-27 21:34:26 -06:00
Yat Ho
02ca4e3e2b build: support building with system gtest (#8196)
* build: support building with system gtest

* chore: include gtest headers with h-char include
2026-01-27 20:15:11 -06:00
Charles Kerr
4e1b092a17 refactor: use std::remove_cvref_t (#8240) 2026-01-27 20:14:47 -06:00
Charles Kerr
68e9049b17 refactor: tr_torrentRemove() now takes std::function args (#8229) 2026-01-27 14:37:11 -06:00
Yat Ho
cbc4e9dc3a refactor: mock udp announcer DNS resolver for tests (#8232)
* refactor: move udp tracker dns lookup to mediator

* test: mock udp announcer DNS resolver
2026-01-27 12:38:24 -06:00
Yat Ho
c738b9fe4d build: support building with system wide-integer (#8209) 2026-01-27 12:22:32 -06:00
Charles Kerr
78e733e7bd refactor: fix trivial modernize-use-ranges warnings (#8181) 2026-01-27 12:16:36 -06:00
Yat Ho
83e5e5842a refactor: remove tr-popcount.h (#8234) 2026-01-27 12:15:08 -06:00
Yat Ho
eeaa4d7412 chore(core): fix modernize-use-constraints (#8236) 2026-01-27 09:17:31 -06:00
Charles Kerr
c54dfd76fa refactor: make tr_web use std::chrono for deadline computation (#8224) 2026-01-26 19:14:13 -06:00
Yat Ho
316576cca1 refactor: remove TR_CONSTEXPR20 (#8228) 2026-01-26 14:36:04 -06:00
Yat Ho
bcac3bd461 build: support building with system small (#8208) 2026-01-26 10:01:51 -06:00
Yat Ho
2362afd113 refactor: remove tr_isDirection() (#8213) 2026-01-26 10:00:02 -06:00
Charles Kerr
dda5dc7ec3 refactor: remove some dead code (#8222)
* chore: remove unused tr_announcerCreate() declaration

added in d27c4c5 but never used

* chore: remove unused ParserStack::parentType()

added in 5efec26 but never used

* chore: remove tr_port::set_network()

added in 32f854a but never used

* chore: remove tr_torrent_metainfo::pieces_offset()

added in 52f6e80 but never used

* chore: remove unused `tr_session::setPeerCongestionAlgorithm()`

unused after 611d36a

chore: remove unused `tr_session::setAnnounceIP()`

unused after 611d36a
2026-01-26 07:22:20 -06:00
Yat Ho
d9585782a6 build: improve building with system crc32c (#8197) 2026-01-25 20:03:14 -06:00
Charles Kerr
a7b2a72cca refactor: remove tr_pathbuf::popdir() (#8221) 2026-01-25 20:02:59 -06:00
Yat Ho
daf15c01c3 build: improve building with system dht (#8192) 2026-01-25 19:12:58 -06:00
Charles Kerr
03fdb6f48e refactor: migrate C strings to std::string_view in libtransmission/file.h (#8220)
* refactor: tr_sys_file_open() now takes a std::string_view arg

* refactor: tr_sys_path_copy() now takes a std::string_view arg

* refactor: tr_blocklistSetContent() now takes a std::string_view arg

* refactor: tr_sys_path_remove() now takes a std::string_view arg

* refactor: tr_sys_path_exists() now takes a std::string_view arg

* refactor: tr_sys_dir_create() now takes a std::string_view arg

* refactor: add private stat_sv(), lstat_sv() helpers in file-posix.cc

* refactor: tr_sys_path_is_same() now takes a std::string_view arg

* refactor: tr_sys_path_rename() now takes a std::string_view arg
2026-01-25 18:39:50 -06:00
Yat Ho
4a900b10e7 build: improve building with system psl (#8193) 2026-01-25 12:11:57 -06:00
Yat Ho
0845c44c14 build: improve building with system libnatpmp (#8189) 2026-01-25 12:11:31 -06:00
Mitch Livingston
2d75dea939 fix: Hide Status Bar/Filter Bar never changing to "Show" (#8216) (#8070) 2026-01-24 17:12:52 -06:00
Yat Ho
3636f5f35e fix: modernize-use-designated-initializers in core and tests (#8186)
* fix(core): `modernize-use-designated-initializers`

* fix(tests): `modernize-use-designated-initializers`
2026-01-23 21:50:08 -06:00
Yat Ho
56f3578ec9 fix: don't generate zero size files in makemeta-test.cc (#8199)
* fix: don't generate zero size files in makemeta-test.cc

* chore: housekeeping
2026-01-23 21:48:56 -06:00
Yat Ho
b617dea8ad build: improve building with system libdeflate (#8188) 2026-01-23 11:05:03 -06:00
Yat Ho
665f689e44 build: support building with system {fmt} (#8187) 2026-01-23 11:04:16 -06:00
Yat Ho
9cee1d3d3b build: improve building with system libb64 (#8195) 2026-01-23 11:02:41 -06:00
Charles Kerr
cccef8e2a6 refactor: use fewer raw C strings (#8202)
* refactor: tr_ctorGetDownloadDir() returns a std::optional<std::string>

* refactor: tr_sessionGetConfigDir() now returns a std::string

* refactor: tr_sessionGetDownloadDir() now returns a std::string

* refactor: tr_sessionGetIncompleteDir() now returns a std::string

* refactor: tr_sessionGetRPCWhitelist() now returns a std::string

* refactor: tr_sessionGetRPCPassword() now returns a std::string

* refactor: tr_sessionGetRPCUsername() now returns a std::string

* refactor: tr_sessionGetScript() now returns a std::string

* refactor: tr_blocklistGetURL() now returns a std::string

* refactor: tr_ctorGetSourceFile() now returns a std::optional<std::string>

* refactor: tr_torrentFile() now returns a std::string
2026-01-22 22:36:24 -06:00
Charles Kerr
e7129cfd54 refactor: use fewer raw C strings (#8201)
* refactor: tr_blocklistSetURL() takes a string_view

* refactor: tr_ctorSetMetainfoFromFile() takes a string_view

* refactor: tr_ctorSetMetainfoFromMagnetLink() takes a string_view

* refactor: tr_torrentSetDownloadDir() takes a string_view

* refactor: tr_ctorSetDownloadDir() takes a string_view

* refactor: tr_ctorSetIncompleteDir() takes a string_view

* refactor: tr_torrentSetTrackerList() takes a string_view

* refactor: tr_torrentRenamePath() now takes a std::string_view

* refactor: tr_torrentFindFromMagnetLink() takes a string_view
2026-01-22 16:31:08 -06:00
Charles Kerr
f6e9027da7 refactor: use fewer raw C strings (#8200)
* refactor: tr_sessionSaveSettings() takes a string_view

* refactor: tr_sessionSetDownloadDir() takes a string_view

* refactor: tr_sessionSetIncompleteDir() takes a string_view

* refactor: tr_sessionSetRPCCWhitelist() takes a string_view

* refactor: tr_sessionSetRPCPassword() takes a string_view

* refactor: tr_sessionSetRPCUsername() takes a string_view

* refactor: tr_sessionSetDefaultTrackers() takes a string_view

* refactor: tr_sessionSetScript() takes a string_view
2026-01-22 14:38:20 -06:00
Yat Ho
f319bc6bf6 ci: update and test more Debian versions (#8153) 2026-01-22 09:06:41 -06:00
Yat Ho
16ec031a28 build: infrastructure for third party submodules (#8178) 2026-01-21 23:38:34 -06:00
Charles Kerr
87511c7123 test: add Session tests (#8185)
* build: disable some clang-tidy checks

we cannot use ranges while still supporting gcc 8

* refactor: add Prefs::keyval()

refactor: remove Prefs::getKey()

test: add Prefs::keyval() tests

* refactor: add Prefs::set(idx, tr_variant)

refactor: remove Prefs::type(idx)

refactor: remove Prefs::variant(idx)

* refactor: create RpcClient in main()

* test: add qt remote session tests
2026-01-21 22:36:41 -06:00
Charles Kerr
46005038e6 refactor: tr_torrentGetCurrentDir() returns a std::string_view (#8173)
* refactor: gtr_open_file() now takes a std::string_view

refactor: gtr_open_file() now calls Glib::filename_to_uri()

refactor: add gtr_open_file() variant that takes basedir and relative path

refactor: gtr_open_uri() now takes a relative_path std::string_view

* refactor: tr_torrentGetCurrentDir() now returns a std::string_view

refactor: tr_torrentGetDownloadDir() now returns a std::string_view
2026-01-21 11:40:16 -06:00
Yat Ho
35599a2d14 ci: bump to peter-evans/create-pull-request@v8 (#8177) 2026-01-21 11:06:54 -06:00
Yat Ho
6327cc6c2e build: add USE_SYSTEM_DEFAULT option (#8176)
* build: add `USE_SYSTEM_DEFAULT` option

* ci: use `USE_SYSTEM_DEFAULT`
2026-01-21 09:08:04 -06:00
Charles Kerr
7f5730984a refactor: add tr_strv_to_utf8_nsstring() (#8174)
* refactor: rename enum types in ip-cache private enum class is_updating_t

this avoids name collisions with YES and NO on macOS

* refactor: rename tr_strv_convert_utf8() to tr_strv_to_utf8_string()

use a name that is symmetrical with the upcoming tr_strv_to_utf8_nsstring()

* feat: add tr_strv_to_utf8_nsstring()

* test: add tests for the new tr_strv_to_utf8_nsstring() methods
2026-01-21 08:25:07 -06:00
Charles Kerr
83d49b3c7f ci: add run-tests composite action (#8159)
* ci: add run-tests composite action

* fixup! ci: add run-tests composite action

send sanitizer log messages to stderr

otherwise, they will break transmission-show tests

* fixup! ci: add run-tests composite action

fix windows, alpine breakage

* fixup! ci: add run-tests composite action

fix: sanitizer logging to stderr

* fixup! ci: add run-tests composite action

disable asan leak detection on macOS: the feature is unsupported there

* fixup! refactor: extract platform detection into its own composite action (#8158)

ensure bash is installed on alpine linux
2026-01-21 08:24:46 -06:00
Charles Kerr
62be679769 refactor: remove tr_session* argument from tr_rpc_response_func (#8160) 2026-01-20 19:44:06 -06:00
Yat Ho
cbc5388440 build: bump to C++20 (#7191)
* build: bump to C++20

Co-authored-by: Cœur <coeur@gmx.fr>

* refactor: use designated initializers

* refactor: remove redundant SFINAE

* fix: clang-tidy warnings

* chore: comments about min compiler versions for C++20 features

* build: clang objc++ modules build errors

Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* refactor: add `TR_CONSTEXPR_VEC` and `TR_CONSTEXPR_STR`

* fix: don't use `std::rel_ops`

* chore: housekeeping

* fix: possible fix for macOS linker error

---------

Co-authored-by: Cœur <coeur@gmx.fr>
Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2026-01-20 16:27:34 -06:00
Yat Ho
a3202cbe47 fix: incorrectly set error when moving across filesystems (#8167) 2026-01-20 11:16:47 -06:00
Yat Ho
7de5795cde ci: only setup nodejs if make-web == true (#8171) 2026-01-20 11:12:41 -06:00
Charles Kerr
49f6f20361 refactor: remove unused libtransmission api (#8169)
* refactor: remove tr_getDefaultConfigDirToBuf()

* refactor: remove tr_torrentFindFileToBuf()

* refactor: remove tr_torrentGetMagnetLinkToBuf()

* refactor: remove tr_getDefaultDownloadDirToBuf()

* refactor: remove tr_torrentGetTrackerListToBuf()

* refactor: remove tr_torrentFilenameToBuf()

* refactor: remove tr_strv_to_buf()
2026-01-19 17:35:12 -06:00
Yat Ho
f6d4585b38 fix(remote): crash when number argument is invalid (#8156)
* fix: crash when `--global-seedratio` argument is invalid

* fix: crash when `--global-idle-seeding-limit` argument is invalid

* fix: crash when `--peers` argument is invalid

* fix: crash when `--tracker-remove` argument is invalid

* fix: crash when `--seedratio` argument is invalid

* fix: crash when `--idle-seeding-limit` argument is invalid
2026-01-16 17:56:02 -06:00
Yat Ho
4e03de7630 fix: use weak pointers for ip cache curl callback (#8157) 2026-01-16 17:11:03 -06:00
Charles Kerr
6248b9d303 refactor: extract platform detection into its own composite action (#8158) 2026-01-16 12:59:30 -06:00
Charles Kerr
36ea62cf6e ci: add install-deps composite action (#8152) 2026-01-16 10:10:00 -06:00