Commit Graph

16507 Commits

Author SHA1 Message Date
Yat Ho
62c8edc039 refactor: use api_compat for rpc (#7995)
* fix: legacy RPC tag should ignore non-integers

* refactor: delegate legacy RPC callback to api-compat

* refactor: move `TR_KEY_alt_speed_down_kebab` handling

* refactor: move `TR_KEY_alt_speed_enabled_kebab` handling

* refactor: move `TR_KEY_alt_speed_time_begin_kebab` handling

* refactor: move `TR_KEY_alt_speed_time_day_kebab` handling

* refactor: move `TR_KEY_alt_speed_time_enabled_kebab` handling

* refactor: move `TR_KEY_alt_speed_time_end_kebab` handling

* refactor: move `TR_KEY_alt_speed_up_kebab` handling

* refactor: move `TR_KEY_anti_brute_force_enabled_kebab` handling

* refactor: move `TR_KEY_anti_brute_force_threshold_kebab` handling

* refactor: move `TR_KEY_blocklist_enabled_kebab` handling

* refactor: move `TR_KEY_blocklist_size_kebab` handling

* refactor: move `TR_KEY_blocklist_url_kebab` handling

* refactor: move `TR_KEY_cache_size_mb_kebab` handling

* refactor: move `TR_KEY_config_dir_kebab` handling

* refactor: move `TR_KEY_default_trackers_kebab` handling

* refactor: move `TR_KEY_dht_enabled_kebab` handling

* refactor: move `TR_KEY_download_dir_kebab` handling

* refactor: move `TR_KEY_download_dir_free_space_kebab` handling

* refactor: move `TR_KEY_download_queue_enabled_kebab` handling

* refactor: move `TR_KEY_download_queue_size_kebab` handling

* refactor: move `TR_KEY_idle_seeding_limit_kebab` handling

* refactor: move `TR_KEY_idle_seeding_limit_enabled_kebab` handling

* refactor: move `TR_KEY_incomplete_dir_kebab` handling

* refactor: move `TR_KEY_incomplete_dir_enabled_kebab` handling

* refactor: move `TR_KEY_lpd_enabled_kebab` handling

* refactor: move `TR_KEY_peer_limit_global_kebab` handling

* refactor: move `TR_KEY_peer_limit_per_torrent_kebab` handling

* refactor: move `TR_KEY_peer_port_kebab` handling

* refactor: move `TR_KEY_peer_port_random_on_start_kebab` handling

* refactor: move `TR_KEY_pex_enabled_kebab` handling

* refactor: move `TR_KEY_port_forwarding_enabled_kebab` handling

* refactor: move `TR_KEY_queue_stalled_enabled_kebab` handling

* refactor: move `TR_KEY_queue_stalled_minutes_kebab` handling

* refactor: move `TR_KEY_rename_partial_files_kebab` handling

* refactor: move `TR_KEY_rpc_version_kebab` handling

* refactor: move `TR_KEY_rpc_version_minimum_kebab` handling

* refactor: move `TR_KEY_rpc_version_semver_kebab` handling

* refactor: move `TR_KEY_script_torrent_added_enabled_kebab` handling

* refactor: move `TR_KEY_script_torrent_added_filename_kebab` handling

* refactor: move `TR_KEY_script_torrent_done_enabled_kebab` handling

* refactor: move `TR_KEY_script_torrent_done_filename_kebab` handling

* refactor: move `TR_KEY_script_torrent_done_seeding_enabled_kebab` handling

* refactor: move `TR_KEY_script_torrent_done_seeding_filename_kebab` handling

* refactor: remove `tr_quark_convert` usage for `tr_session::Scripts`

* refactor: move `TR_KEY_seed_ratio_limit_camel` handling

* refactor: move `TR_KEY_seed_ratio_limited_camel` handling

* refactor: move `TR_KEY_seed_queue_enabled_kebab` handling

* refactor: move `TR_KEY_seed_queue_size_kebab` handling

* refactor: move `TR_KEY_session_id_kebab` handling

* refactor: move `TR_KEY_speed_limit_down_kebab` handling

* refactor: move `TR_KEY_speed_limit_down_enabled_kebab` handling

* refactor: move `TR_KEY_speed_limit_up_kebab` handling

* refactor: move `TR_KEY_speed_limit_up_enabled_kebab` handling

* refactor: move `TR_KEY_start_added_torrents_kebab` handling

* refactor: move `TR_KEY_tcp_enabled_kebab` handling

* refactor: move `TR_KEY_trash_original_torrent_files_kebab` handling

* refactor: move `TR_KEY_utp_enabled_kebab` handling

* refactor: move `TR_KEY_recently_active_kebab` handling

* refactor: move `TR_KEY_delete_local_data_kebab` handling

* refactor: move `TR_KEY_activity_date_camel` handling

* refactor: move `TR_KEY_added_date_camel` handling

* refactor: move `TR_KEY_bandwidth_priority_camel` handling

* refactor: move `TR_KEY_bytes_completed_camel` handling

* refactor: move `TR_KEY_corrupt_ever_camel` handling

* refactor: move `TR_KEY_date_created_camel` handling

* refactor: move `TR_KEY_desired_available_camel` handling

* refactor: move `TR_KEY_done_date_camel` handling

* refactor: move `TR_KEY_download_dir_camel` handling

* refactor: move `TR_KEY_download_limit_camel` handling

* refactor: move `TR_KEY_download_limited_camel` handling

* refactor: move `TR_KEY_downloaded_ever_camel` handling

* refactor: move `TR_KEY_edit_date_camel` handling

* refactor: move `TR_KEY_error_string_camel` handling

* refactor: move `TR_KEY_eta_idle_camel` handling

* refactor: move `TR_KEY_file_stats_camel` handling

* refactor: move `TR_KEY_file_count_kebab` handling

* refactor: move `TR_KEY_hash_string_camel` handling

* refactor: move `TR_KEY_have_unchecked_camel` handling

* refactor: move `TR_KEY_have_valid_camel` handling

* refactor: move `TR_KEY_honors_session_limits_camel` handling

* refactor: move `TR_KEY_is_finished_camel` handling

* refactor: move `TR_KEY_is_private_camel` handling

* refactor: move `TR_KEY_is_stalled_camel` handling

* refactor: move `TR_KEY_left_until_done_camel` handling

* refactor: move `TR_KEY_magnet_link_camel` handling

* refactor: move `TR_KEY_manual_announce_time_camel` handling

* refactor: move `TR_KEY_max_connected_peers_camel` handling

* refactor: move `TR_KEY_metadata_percent_complete_camel` handling

* refactor: move `TR_KEY_peer_limit_kebab` handling

* refactor: move `TR_KEY_peers_connected_camel` handling

* refactor: move `TR_KEY_peers_from_camel` handling

* refactor: move `TR_KEY_peers_getting_from_us_camel` handling

* refactor: move `TR_KEY_peers_sending_to_us_camel` handling

* refactor: move `TR_KEY_percent_complete_camel` handling

* refactor: move `TR_KEY_percent_done_camel` handling

* refactor: move `TR_KEY_piece_count_camel` handling

* refactor: move `TR_KEY_piece_size_camel` handling

* refactor: move `TR_KEY_primary_mime_type_kebab` handling

* refactor: move `TR_KEY_queue_position_camel` handling

* refactor: move `TR_KEY_rate_download_camel` handling

* refactor: move `TR_KEY_rate_upload_camel` handling

* refactor: move `TR_KEY_recheck_progress_camel` handling

* refactor: move `TR_KEY_seconds_downloading_camel` handling

* refactor: move `TR_KEY_seconds_seeding_camel` handling

* refactor: move `TR_KEY_seed_idle_limit_camel` handling

* refactor: move `TR_KEY_seed_idle_mode_camel` handling

* refactor: move `TR_KEY_seed_ratio_mode_camel` handling

* refactor: move `TR_KEY_size_when_done_camel` handling

* refactor: move `TR_KEY_start_date_camel` handling

* refactor: move `TR_KEY_torrent_file_camel` handling

* refactor: move `TR_KEY_total_size_camel` handling

* refactor: move `TR_KEY_tracker_list_camel` handling

* refactor: move `TR_KEY_tracker_stats_camel` handling

* refactor: move `TR_KEY_upload_limit_camel` handling

* refactor: move `TR_KEY_upload_limited_camel` handling

* refactor: move `TR_KEY_upload_ratio_camel` handling

* refactor: move `TR_KEY_uploaded_ever_camel` handling

* refactor: move `TR_KEY_webseeds_sending_to_us_camel` handling

* refactor: move `TR_KEY_announce_state_camel` handling

* refactor: move `TR_KEY_download_count_camel` handling

* refactor: move `TR_KEY_has_announced_camel` handling

* refactor: move `TR_KEY_has_scraped_camel` handling

* refactor: move `TR_KEY_is_backup_camel` handling

* refactor: move `TR_KEY_last_announce_peer_count_camel` handling

* refactor: move `TR_KEY_last_announce_result_camel` handling

* refactor: move `TR_KEY_last_announce_start_time_camel` handling

* refactor: move `TR_KEY_last_announce_succeeded_camel` handling

* refactor: move `TR_KEY_last_announce_time_camel` handling

* refactor: move `TR_KEY_last_announce_timed_out_camel` handling

* refactor: move `TR_KEY_last_scrape_result_camel` handling

* refactor: move `TR_KEY_last_scrape_start_time_camel` handling

* refactor: move `TR_KEY_last_scrape_succeeded_camel` handling

* refactor: move `TR_KEY_last_scrape_time_camel` handling

* refactor: move `TR_KEY_last_scrape_timed_out_camel` handling

* refactor: move `TR_KEY_leecher_count_camel` handling

* refactor: move `TR_KEY_next_announce_time_camel` handling

* refactor: move `TR_KEY_next_scrape_time_camel` handling

* refactor: move `TR_KEY_scrape_state_camel` handling

* refactor: move `TR_KEY_seeder_count_camel` handling

* refactor: move `TR_KEY_client_is_choked_camel` handling

* refactor: move `TR_KEY_client_is_interested_camel` handling

* refactor: move `TR_KEY_client_name_camel` handling

* refactor: move `TR_KEY_flag_str_camel` handling

* refactor: move `TR_KEY_is_downloading_from_camel` handling

* refactor: move `TR_KEY_is_encrypted_camel` handling

* refactor: move `TR_KEY_is_incoming_camel` handling

* refactor: move `TR_KEY_is_utp_camel` handling

* refactor: move `TR_KEY_is_uploading_to_camel` handling

* refactor: move `TR_KEY_peer_is_choked_camel` handling

* refactor: move `TR_KEY_peer_is_interested_camel` handling

* refactor: move `TR_KEY_rate_to_client_camel` handling

* refactor: move `TR_KEY_rate_to_peer_camel` handling

* refactor: move `TR_KEY_from_cache_camel` handling

* refactor: move `TR_KEY_from_dht_camel` handling

* refactor: move `TR_KEY_from_incoming_camel` handling

* refactor: move `TR_KEY_from_lpd_camel` handling

* refactor: move `TR_KEY_from_ltep_camel` handling

* refactor: move `TR_KEY_from_pex_camel` handling

* refactor: move `TR_KEY_from_pex_camel` handling

* refactor: move `TR_KEY_tracker_add_camel` handling

* refactor: move `TR_KEY_tracker_remove_camel` handling

* refactor: move `TR_KEY_tracker_replace_camel` handling

* refactor: move `TR_KEY_downloaded_bytes_camel` handling

* refactor: move `TR_KEY_files_added_camel` handling

* refactor: move `TR_KEY_seconds_active_camel` handling

* refactor: move `TR_KEY_session_count_camel` handling

* refactor: move `TR_KEY_uploaded_bytes_camel` handling

* refactor: move `TR_KEY_active_torrent_count_camel` handling

* refactor: move `TR_KEY_cumulative_stats_kebab` handling

* refactor: move `TR_KEY_cumulative_stats_kebab` handling

* refactor: move `TR_KEY_download_speed_camel` handling

* refactor: move `TR_KEY_paused_torrent_count_camel` handling

* refactor: move `TR_KEY_torrent_count_camel` handling

* refactor: move `TR_KEY_upload_speed_camel` handling

* refactor: move `TR_KEY_files_unwanted_kebab` handling

* refactor: move `TR_KEY_files_wanted_kebab` handling

* refactor: move `TR_KEY_priority_high_kebab` handling

* refactor: move `TR_KEY_priority_low_kebab` handling

* refactor: move `TR_KEY_priority_normal_kebab` handling

* refactor: move `TR_KEY_port_is_open_kebab` handling

* refactor: move `TR_KEY_torrent_duplicate_kebab` handling

* refactor: move `TR_KEY_torrent_added_kebab` handling

* refactor: move `TR_KEY_memory_bytes_kebab` handling

* refactor: move `TR_KEY_memory_units_kebab` handling

* refactor: move `TR_KEY_size_bytes_kebab` handling

* refactor: move `TR_KEY_size_units_kebab` handling

* refactor: move `TR_KEY_speed_bytes_kebab` handling

* refactor: move `TR_KEY_speed_units_kebab` handling

* refactor: remove DoneCb

* perf: adjust reserve capacity
2025-12-24 13:29:59 -06:00
Charles Kerr
cf37c7daff refactor: migrate transmission-remote to JSON-RPC (#7986)
* feat: sniff TR_RPC_RPC_VERSION_HEADER in 409 headers

* refactor: use api_compat::convert() when sending requests

* refactor: update to JSON-RPC: print_session()

refactor: update to JSON-RPC: print_session_stats()

* refactor: update to JSON-RPC: print_session()

refactor: update to JSON-RPC: print_details()

* refactor: update to JSON-RPC: print_file_list()

* refactor: update to JSON-RPC: print_torrent_list()

* refactor: update to JSON-RPC: print_trackers()

* refactor: update to JSON-RPC: print_port_test()

* refactor: update to JSON-RPC: print_pieces()

* refactor: update the rest

* feat: check the JSON-RPC version number too

* feat: better errmsg detection

* chore: remove accidentally-committed tracer

* fix: regression

* chore: remove accidentally-committed tracer

* fix: return the right variable in serialize_payload()

* fix: check for blocklist_update too

* perf: reserve the right number of args

* refactor: remove unnecesary logic branch

* perf: avoid unnecessary tr_variant.clone() call

* fixup! feat: check the JSON-RPC version number too

tearfur's code was fine; I introduced this bug as committer

* fix: handle http 204 replies silently

---------

Co-authored-by: Yat Ho <lagoho7@gmail.com>
2025-12-24 11:59:35 -06:00
Charles Kerr
27f0e2e20d test: always call tr_lib_init() in libtransmission tests (#7992)
* test: add TransmissionTest fixture that calls tr_lib_init()

* refactor: use std::call_once() in tr_lib_init()

* test: ensure quarks are sorted in RpcTest::sessionGet

* refactor: use ::libtransmission::test::TransmissionTest

prefer this over ::testing::Test to ensure tr_lib_init() is called once
2025-12-23 14:32:29 -06:00
Yat Ho
dbd4ea5be8 fix(daemon): missing break statement in switch (#7991) 2025-12-23 13:13:32 -06:00
Yat Ho
8241fdab5f fix: handle unaligned torrents in wishlist (#7944)
* fix: handle unaligned torrent pieces and blocks in wishlist

* test: unaligned tests
2025-12-22 23:31:56 -06:00
Yat Ho
dcd516b673 feat: update daemon args for preferred_transports (#7988)
* feat: add `--preferred-transports` to daemon

* chore: deprecate `--(no-)utp` in daemon

* fix: `--(no-)utp` args in daemon
2025-12-22 23:11:41 -06:00
Charles Kerr
257b870604 fix: work around a dumb rapidjson bug (#7985) 2025-12-22 23:10:53 -06:00
Charles Kerr
71ab8cb09f refactor: remove redundant calls to tr_quark_convert() (#7987) 2025-12-22 23:05:55 -06:00
Yat Ho
f2600cf058 chore(remote): deprecate --(no-)utp (#7990) 2025-12-22 23:05:16 -06:00
Charles Kerr
d5314e2c44 refactor: add libtransmission-app (#7978)
* refactor: add libtransmission-app

* refactor: add libtransmission-app/display-modes.h

* refactor: use app::SortMode, app:ShowMode in Qt client

* feat: add to_variant(), to_value() in serializer

* refactor: use app::SortMode in GTK client

* refactor: use app::ShowMode in GTK client

* refactor: make naming consistent with libtransmission-app
2025-12-22 20:05:57 -06:00
Yat Ho
888f90ca1e fix: race condition in tr_torrentStat() (#7948)
* fix: acquire session lock in `tr_torrent::stats()`

* refactor(mac): lock once for the whole updateUI operation
2025-12-22 15:29:15 -06:00
Charles Kerr
62c362eacb fix: clang-tidy warnings in Qt client (#7981)
* fix: readability-identifier-naming

* fix: misc-unused-using-decls

* fix: google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements

* fix: cert-err58-cpp

* fix: bugprone-unchecked-optional-access

* Revert "fix: cert-err58-cpp"

This reverts commit 6e6d97228f.

* fix: better to keep QStringLiteral; disable spurious cert-err58-cpp warning
2025-12-22 09:34:04 -06:00
Yat Ho
1afbe8b675 feat: sync the values of preferred_transports and *_enabled (#7980)
* feat: sync the values of `preferred_transports` and `*_enabled`

* refactor: avoid using `tr_session::allowsTCP()`

* code review: implement fixup methods in source file
2025-12-22 09:15:53 -06:00
Yat Ho
91d9f1f776 feat: generic support for optional fields in serializer (#7979) 2025-12-22 07:58:09 -06:00
Charles Kerr
8f445496c2 refactor: use unmanaged_string for periodic torrent_get fields (#7977)
* refactor: remove Session::addKeyName()

refactor: remove Session::removeKeyName()

these should have been removed a long time ago

* fix: better logging on error in Converters

* refactor: add Qt-app-specific variant converters

* refactor: use tr_variant::unmanaged_string(tr_quark) when in torrent_get table mode
2025-12-21 20:49:41 -06:00
Charles Kerr
0607ea472f perf: use unmanaged strings when populating initial prefs (#7976) 2025-12-21 19:35:14 -06:00
Charles Kerr
433203f82f perf: unmanaged strings in rpcimpl (#7975)
* perf: in rpcimpl, use tr_variant::unmanaged_string() for unit strings

* perf: in rpcimpl, use tr_variant::unmanaged_string() encryption mode

* perf: in rpcimpl, use tr_variant::unmanaged_string() for TrRpcVersionSemver
2025-12-21 11:17:53 -06:00
Charles Kerr
e9c847d965 perf: api_compat::convert() operates inplace rather than creating a new variant (#7973)
* perf: api_compat::convert() operates inplace rather than creating a new variant

* refactor: update bandwidth groups calls
2025-12-21 06:22:05 -06:00
Charles Kerr
4599a7312e refactor: libtransmission::serializer redesign (#7954)
* refactor: libtransmission::serializer redesign

This is a followup to bf48eadaeb with several goals.

- `Converters` now has container-like concepts to make it Just Work
  when a user tries to convert containers of T, e.g. std::vector<T>,
  std::set<T>, QStringList, small:vector<T>, etc.

- `Fields` are now stored in a std::tuple instead of a std::array.
  This has two important benefits:
  1. `Fields` are smaller and can be made constexpr / consteval
  2. We no longer need to use type erasure. The void pointer casts
  and typeinfo lookups are gone and the new code is typesafe.

- naming cleanup:

  - renamed the namespace to `libtransmission::serializer`.
  - renamed the file to `serializer.h`
  - renamed the tr_variant<->T converter registry class to `Converters`.

- removed use of the CRTP. You can now serialize any struct
  without having to subclass `Serializable`.

I think I am done refactoring this for awhile.

* fix: naming is hard

docs: better code comments

* fix: clang-tidy readability-identifier-naming

* Update tests/libtransmission/serializer-tests.cc

Co-authored-by: Yat Ho <lagoho7@gmail.com>

* refactor: remove tr_variant<->int converter

* improve tests

---------

Co-authored-by: Yat Ho <lagoho7@gmail.com>
2025-12-21 06:04:18 -06:00
Charles Kerr
ed827dd1a1 feat: Qt client now formats RPC requests in the RPC server's preferred style (#7963)
* feat: Qt client now formats RPC requests in the RPC server's preferred style

* add macro to build TrRpcVersionSemver

Co-authored-by: Yat Ho <lagoho7@gmail.com>
2025-12-20 11:05:35 -06:00
Yat Ho
615bb4f5e7 refactor: use apicompat for bandwidth-groups.json (#7972) 2025-12-20 11:02:55 -06:00
Charles Kerr
3fc8003c02 refactor: remove tr_variant::StringHolder (#7953)
* perf: remove tr_variant::StringHolder

* fix: disallow get_if<std::string>() and get_if<std::string_view>()

* refactor: remove `tr_variant::VisitAdapter` (#7960)

Co-authored-by: Yat Ho <lagoho7@gmail.com>
2025-12-19 22:24:39 -06:00
Charles Kerr
8a8acfccb6 refactor: add new transmission::app namespace (#7964)
Move `FavIconCache` into a new `transmission::app` namespace.

I intend to add a couple more pieces into libtransmission to avoid
code duplication between the Qt and GTK apps.

We should consider making another module for these pieces if they start
to pile up; but for now, let's cordon them into their own namespace.
2025-12-19 13:58:40 -06:00
Charles Kerr
057fe90b3c fix: copypaste error (#7962)
Xref: https://github.com/transmission/transmission/pull/7892
2025-12-19 12:58:13 -06:00
Yat Ho
15495640d3 refactor: re-use recalculate_wanted_pieces logic in wishlist constructor (#7946)
* refactor: re-use `recalculate_wanted_pieces` logic in wishlist constructor

* test: does not request pieces that the client already has
2025-12-19 12:44:57 -06:00
Yat Ho
f61b0213a9 feat: add X-Transmission-Rpc-Version (#7958) 2025-12-19 10:03:37 -06:00
Yat Ho
c4587503f6 test: variant constructor and assignment operator (#7957)
* test: variant constructor

* test: variant assignment operator
2025-12-19 08:05:05 -06:00
Charles Kerr
804fb20a80 refactor: more JSON-RPC migration in transmission-qt (#7959)
* refactor: use api_compat::convert_incoming_data() and convert_outgoing_data() in RpcClient

* refactor: use convert_outgoing_data() when saving settings.json in Prefs::~Prefs

* refactor: remove all kebab, camel keys from qt client

* refactor: rename RpcResponse.result to RpcResponse.errmsg

* refactor: parse jsonrpc responses

* refactor: build RPC requests in JSON-RPC 2.0

* fix: Qt5 build error
2025-12-19 07:51:52 -06:00
Charles Kerr
1a18462691 refactor: make tr_sessionInit() config_dir arg a string_view (#7939) 2025-12-18 23:06:23 -06:00
Yat Ho
99af641738 docs: update settings.json docs for api-compat (#7955) 2025-12-18 20:06:27 -06:00
Yat Ho
2405c8a151 fix: add client_has_piece check to recalculate_wanted_pieces (#7945) 2025-12-18 14:05:23 -06:00
Charles Kerr
0d036de3e5 fix: support sort mode, show mode in api_compat (#7952)
* refactor: add api-compat for sort-mode

* refactor: add api-compat for show-mode

* test: update tests

* chore: make clang-tidy happy
2025-12-18 14:02:16 -06:00
Yat Ho
c197812b45 refactor: use api-compat for settings.json (#7950) 2025-12-18 10:29:43 -06:00
Charles Kerr
e35527cb4a refactor: minor cleanup in RpcClient.cc (#7951)
* refactor: RpcClient::sendNetworkRequest() takes a QByteArray body arg

* refactor: RpcClient::sendLocalRequest() takes a tr_variant const& req arg

* refactor: move RpcClient::getNextTag() into an anonymous namespace

* refactor: merge RpcClient::exec() and RpcClient::sendRequest()

* refactor: remove unnecessary heap allocation in RpcClient::networkRequestFinished()
2025-12-18 10:29:08 -06:00
Charles Kerr
833e37dab5 build: bump Qt minimum to 5.15 (#7943)
* deps: bump QT_MINIMUM from 5.6 to 5.15

* chore: remove now-obsolete qt >= 5.8 checks

* chore: remove now-obsolete qt >= 5.14 checks
2025-12-18 07:39:25 -06:00
Charles Kerr
6fcd2d2297 fix: invalidateFilter() Qt deprecation warning (#7940) 2025-12-17 02:04:46 -06:00
Charles Kerr
f8970a9183 refactor: use the new jsonrpc API for RPC calls in tr-gtk (#7938)
* feat: copy TR_RPC_VERBOSE env var feature from tr-qt
2025-12-16 15:20:51 -06:00
Cœur
c56723ef1f chore: compatibility with clang-format 20 to 21 (#7499) 2025-12-15 23:55:32 -06:00
Charles Kerr
fcd1e2ff8a refactor: simplify tr_sessionLoadSettings() args (#7935)
* refactor: remove unused appname arg from tr_sessionLoadSettings()

* refactor: swap order of arguments to tr_sessionLoadSettings()
  so way the optional arg can go at the end
2025-12-15 13:44:38 -06:00
Charles Kerr
109bc70511 feat: use api_compat for torrent .resume files (#7932)
* test: add benc2cpp.py, a benc beautifier for hardcoded cpp test cases

* test: add .resume file unit test

* refactor: use api_compat::convert_incoming_data() and convert_outgoing_data() on .resume files

* chore: mark TR_KEY_peers2_6_kebab as APICOMPAT

* chore: mark TR_KEY_speed_Bps_kebab as APICOMPAT

* chore: mark TR_KEY_use_speed_limit_kebab as APICOMPAT

* chore: mark as APICOMPAT: TR_KEY_use_global_speed_limit_kebab

* chore: mark as APICOMPAT: TR_KEY_ratio_mode_kebab

* chore: mark as APICOMPAT: TR_KEY_idle_limit_kebab

* chore: mark as APICOMPAT: TR_KEY_idle_mode_kebab

* chore: mark as APICOMPAT: TR_KEY_max_peers_kebab

* chore: mark as APICOMPAT: TR_KEY_added_date_kebab

* chore: mark as APICOMPAT: TR_KEY_seeding_time_seconds_kebab

* chore: mark as APICOMPAT: TR_KEY_downloading_time_seconds_kebab

* chore: mark as APICOMPAT: TR_KEY_bandwidth_priority

* chore: mark as APICOMPAT: TR_KEY_done_date_kebab

* chore: mark as APICOMPAT: TR_KEY_activity_date_kebab

* chore: remove remaining _kebab cases from resume.cc

* chore: clang-format
2025-12-15 09:43:40 -06:00
Yat Ho
725655653a fix: FTBFS with rapidjson 1.1.0 release on GCC < 12 (#7933)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85790
2025-12-15 09:39:46 -06:00
Chase Knowlden
3b4dab66eb fix: build with Visual Studio 2026 (#7924) 2025-12-14 23:26:29 -06:00
Charles Kerr
d7f022599c feat: use api_compat for stats.json (#7918)
* feat: use api_compat for stats.json

* chore: flag old stats.json keys as api_compat-only
2025-12-14 19:44:20 -06:00
Mike Gelfand
887473cade Fix missing Qt client icons on Windows (#7931)
* Enable FreeType and Harfbuzz for Windows release builds

This fixes icon font glyphs rendering in Qt client.

* Bump Qt to 6.10.1

* Use pixel sizes for icon font glyphs rendering on Windows

The glyphs otherwise turn out of a smaller, non-standard size which
makes them less crisp.
2025-12-14 20:39:02 +00:00
Charles Kerr
9a792046f3 feat: add libtransmission::api_compat::convert() (#7917)
Add a module to convert between tr4 and tr5 RPC / settings / config file payloads.

This will be used as a compatibility layer between Transmission 5's naming scheme
and Transmission <= 4.

Co-authored-by: Yat Ho <lagoho7@gmail.com>
Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2025-12-14 10:56:07 -06:00
Charles Kerr
98fdf2dc0b perf: use small::vector<> when sorting map keys (#7928)
I collected stats for a full day & found N=32 to be enough for 99% of cases
2025-12-13 14:45:43 -06:00
Charles Kerr
0fcda4e977 feat: add tr_variant::visit() (#7923)
* refactor: make tr_variant work with std::visit()

* refactor: use tr_variant::visit() in tr_variant_serde

* refactor: use tr_variant::visit() in tr_variant::merge()

* refactor: simplify JsonWriter

* fix: clang-tidy misc-use-internal-linkage

* test: simplify VariantTest.visitsNodesDepthFirst()

* test: simplify VariantTest.visitNestedJsonSummarizesStructure()

* feat: add tr_variant::clone()

* test: simplify variant tests

* docs: add code comments for tr_variant::merge() and tr_variant::clone()

* fix: add stack-smashing handling for JSON parsing

* fix: clang-tidy modernize-raw-string-literal

* Use writer.Key() for object key names

* refactor: remove unnecessary FMT_COMPILE() macros

* refactor: fix tr_variant::VisitAdapter to preserve the visitor category

chore: remove unnecessary std::cref() calls when calling tr_variant::visitor()

---------

Co-authored-by: Yat Ho <lagoho7@gmail.com>
2025-12-13 13:47:54 -06:00
Charles Kerr
64268a3a7f feat: remove informed-consent dialogs (#7920) 2025-12-10 16:28:49 -06:00
Yat Ho
2ee411d222 ci: set ENABLE_TESTS to make-tests on alpine (#7914) 2025-12-10 11:48:48 -06:00
Charles Kerr
f73a259a4e docs: add quark citation code comments (#7912) 2025-12-10 08:18:38 -06:00