Commit Graph

16042 Commits

Author SHA1 Message Date
Gary Elshaw 5ad6b98c7c
docs: update AUTHORS (#6696) 2024-03-14 22:46:54 -05:00
Mike Gelfand 991b0f0d3d
Support WiX toolset versions other than 3.11 (#6689)
Version 3.14 was recently released with security fixes, and GitHub
runners have been updated to use it. Don't hardcode the version in
Program Files directory name to support any 3.x. Since 3.x support will
be dropped within a year, need to plan migration to 5.x when it's
released (4.x isn't suitable because of missing heat replacement).
2024-03-13 16:40:41 +03:00
Cœur 6909ec0bad
build: fix building on macOS 10.14.6, 10.15.7 and 11.7 (#6590) 2024-03-09 10:27:20 -06:00
Hendrik Luup 6a212e7e8e
fix(web): do not close all popups on successful rpc requests (#6675)
Fixes regression introduced in 250f43ae
2024-03-09 09:34:44 -06:00
Yat Ho 5d159e0ee5
docs: fix `torrent-get` `fileStats` and `wanted` docs (#6677)
* docs: fix `torrent-get.wanted` and `torrent-get.fileStats.wanted` docs

* fixup! docs: fix `torrent-get.wanted` and `torrent-get.fileStats.wanted` docs

* docs: add note to differentiate `torrent-get.wanted` and `torrent-get.fileStats.wanted`
2024-03-09 09:05:00 -06:00
Yat Ho 33898b002d
chore: bump small (#6669) 2024-03-08 15:36:50 -06:00
Mike Gelfand 52d1c1f34b
Support CMake 3.28+ in CI jobs on Windows (#6668)
* Support building Qt using CMake 3.28+

CMake 3.28 dropped support for deriving installation prefix(es) based on
PATH environment variable on Windows. Since all the other built packages
already pass necessary prefix path(s) explicitly via CMAKE_PREFIX_PATH
and it works for them, do the same for Qt 6 as well. Building Qt 5 isn't
affected as it doesn't use CMake.

* Fix environment variable name in `windows` build job

Using wrong name resulted in empty `CMAKE_PREFIX_PATH` CMake setting
value, which showed the effects of CMake 3.28 changes yet again.
2024-03-05 02:53:59 +00:00
Hendrik Luup 34b8c827a8
refactor(web): use crypto.randomUUID for UUID if available (#6649)
crypto.randomUUID() is the most up to date way to generate UUIDs.
It works in secure context (HTTPS) and for localhost.
https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID

It has a wide browser support, but we are keeping the fallback
for older browsers and for cases where users are using a custom
hostname without HTTPS, that's not consider a secure context.
https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts
2024-03-04 18:16:31 -06:00
Cœur 04956c35b4
build: target clang-format version 17 (#6631) 2024-03-04 17:49:39 -06:00
Charles Kerr 50dca24f50
refactor: aggregate crypto handles when computing digests (#6662)
* refactor: aggregate per-crypto-pkg fields instead of using inheritance
2024-03-04 16:59:51 -06:00
Hendrik Luup 98c4eb8487
refactor(web): extract mime icon creation to the helper (#6664) 2024-03-04 08:46:25 -06:00
Yat Ho 7a4677ebd2
ci: bump CI actions (#6666)
* chore: bump `peter-evans/create-pull-request`

* chore: bump `actions/checkout`

Breaking changes:
- Bump Node.js runtime to version 20

* chore: bump `actions/*-artifact`

Breaking changes: See https://github.com/actions/download-artifact/releases/tag/v4.0.0

* chore: bump `actions/cache`

Breaking changes:
- Bump Node.js runtime to version 20

* chore: bump `actions/setup-java`

Breaking changes:
- Bump Node.js runtime to version 20

* chore: bump `gradle/gradle-build-action`

Breaking changes:
- Remove the gradle-executable input parameter

* chore: trigger CI

* Revert "chore: trigger CI"

This reverts commit 9f9987f201.
2024-03-04 08:45:37 -06:00
Charles Kerr efd6790973
refactor: remove tr_sys_file_flush() (#6647) 2024-03-03 23:29:38 -06:00
Hendrik Luup 250f43ae68
fix(web): close connection failed alert on successful request (#6657) 2024-03-03 21:00:44 -06:00
Hendrik Luup dc1dc5b6b0
refactor(web): Remove unused functions from utils.js (#6656)
* refactor(web): remove unused createTabsContainer function

```console
$ grep -nr createTabsContainer src/
src/utils.js:85:export function createTabsContainer(id, tabs, callback) {
```

* refactor(web): remove unused setChecked function

```console
$ grep -nr setChecked src/
src/utils.js:213:export function setChecked(element, b) {
```
2024-03-02 21:34:44 -06:00
Charles Kerr 1855cdb731
refactor: replace tr_sys_file_write_line() with fmt::print("...\n") (#6619)
* refactor: use fmt::print in log.cc

https://github.com/fmtlib/fmt/issues/428#issuecomment-395442159
> You can use fmt::print("...\n") on Windows as well.

Use this mechanism instead of tr_sys_file_write_line()

* refactor: use FILE* in daemon

* refactor: remove unused tr_sys_file_flush_possible()

* refactor: remove unused tr_sys_file_write_line()

* refactor: remove unused tr_sys_file_get_std()

* refactor: remove unused tr_std_sys_file_t
2024-02-25 16:12:08 -06:00
Cœur 7f029acf6e
remove duplicate path: Transmission.xcodeproj (#6625) 2024-02-19 00:11:34 -06:00
Charles Kerr a90d0fce2b
refactor: inline simple getters in qt client (#6621)
* refactor: make RpcClient::url() constexpr

* refactor: make Session::getRemoteUrl() constexpr

* refactor: make RpcQueue::setTolerateErrors() constexpr

* refactor: make RpcClient::isLocal() constexpr

* refactor: make Session::isLocal() constexpr

* refactor: make Session::isServer() constexpr

* refactor: make PathButton::label() constexpr

* chore: remove accidentally-committed makelog file
2024-02-18 18:48:27 -06:00
Charles Kerr b1b685af3f
refactor: make tr_torrentReqIsValid() private (#6620) 2024-02-18 16:00:13 -06:00
Charles Kerr 189fe73575
refactor: remove TR_PATH_DELIMITER (#6618) 2024-02-18 01:47:12 -06:00
Yat Ho 348177863a
fix: don't consider peer info inactive if any of the time values is 0 (#6606) 2024-02-17 23:46:02 -06:00
Charles Kerr d11cddc39a
fix: sonarcloud warnings (#6615)
* fix: cpp:S3358 conditional-operators-should-not-be-nested warning in gtk client

* fix: cpp:S1659 define-each-identifier-in-a-dedicated-statement warning in peer-mgr-wishlist

* Revert "fix; cpp:S3642 replace-enum-with-enum-class warning in gtk client"

* fix: cpp:S3576 remove-virtual-specifier-or-replace-it-by-override warning in rpc-server::Settings

* fix: cpp:S3576 remove-virtual-specifier-or-replace-it-by-override warning in tr_session_alt_speeds::Settings

* fix: remove unnecessary Settings subclass declarations

* fix: cpp:S1117 shadow warning in qt client

* fix: cpp:S6004 use init-statement to limit scope of local

* fix: cpp:S5997 replace-std-lock-guard-with-std-sccoped-lock in favicon-cache.h

* fix: cpp:S1659 define-each-identifier-in-a-dedicated-statement warning in announcer

* fix: cpp:S5817 function-should-be-declared-const warning in cache.h

* fix: cpp:S1186 explain-why-method-is-empty warning in favicon-cache

* fix: cpp:S5408 constexpr-variables-should-not-be-declared-inline warning in favicon-cache

* fix: cpp:S3624 explicitly delete copy assignment, ctor of InFlightData

* fix: cpp:S5997 use std-scoped-lock-instead-of-std-lock-guard

* fix: cpp:S5997 use std-scoped-lock-instead-of-std-lock-guard

* fix: cpp:S5817 function-should-be-declared-const warning in favicon-cache.h

* fix: cpp:S5817 function-should-be-declared-const warning in lru-cache

* fix: cpp:S1709 add-the-explicit-keyword-to-this-constructor
2024-02-17 22:43:24 -06:00
Cœur c3667fa5a7
fix clang-format (#6616) 2024-02-17 22:41:52 -06:00
Cœur d7e74654c9
bump fast-float from 5.3.0 to 6.1.0 (#6602)
* bump fast-float from 5.3.0 to 6.0.0

* bump fast-float from 6.0.0 to 6.1.0
2024-02-17 13:32:22 -06:00
Charles Kerr 7c11809672
fix: more clang-tidy warnings (#6608)
* fix: readability-redundant-casting warnings in gtk

* fix: bugprone-move-forwarding-reference warnings in gtk

* fix: readability-redundant-casting warnings in qt

* fix: bugprone-switch-missing-default-case warnings in qt

* fix: readability-use-std-min-max warning in qt client

* fix: readability-static-accessed-through-instance warning in qt client

* fix: cppcoreguidelines-avoid-const-or-ref-data-members warning in qt client

* fix: readability-avoid-nested-conditional-operator warning in qt client

* fixup! fix: readability-use-std-min-max warning in qt client

* fix: readability-redundant-member-init warnings in gtk client

* fix: performance-avoid-endl warnings in gtk client

* chore: disable readability-qualified-auto

too many false warnings

* chore: disable cppcoreguidelines-avoid-const-or-ref-data-members

* chore: fix readability-duplicate-include warning in gtk client

* chore: fix modernize-use-nodiscard warning in gtk client

* chore: fix readability-convert-member-functions-to-static warning in gtk client

* fixup! fix: bugprone-move-forwarding-reference warnings in gtk

* chore: fix performance-enum-size warning in gtk client

* fix: cppcoreguidelines-prefer-member-initializer warning in gtk client

* fix: readability-identifier-naming warning in qt client

* Revert "chore: fix performance-enum-size warning in gtk client"

This reverts commit 5ce6b562f8.

* fix: readability-redundant-member-init warning in move tests

* fix: readability-redundant-casting warnings in tests

* fixup! fix: readability-identifier-naming warning in qt client

* fixup! fix: readability-avoid-nested-conditional-operator warning in qt client

* fix: readability-static-accessed-through-instance warning in qt client

* fix: readability-redundant-casting warning in watchdir tests
2024-02-17 13:31:49 -06:00
Cœur d362b3f0f2
remove obsolete warning: subclass (#6612) 2024-02-17 13:31:25 -06:00
Cœur c6873fe730
remove old warning (#6611) 2024-02-17 13:31:05 -06:00
Yat Ho 16f25e1158
fixup! perf: restore `3.00` wishlist with cached candidates (#6549) (#6604) 2024-02-16 08:28:37 -06:00
Yat Ho 41566cfd0b
feat: WebUI add `Error` case in port test result (#6607)
* refactor: do not rely on port test response to determine ip protocol

* feat: show `Error` in port test if no result is returned
2024-02-15 23:20:23 -06:00
Cœur ee12d697cf
docs: add OS X 10.10 - macOS 10.12 compatibility to previous-releases (#6601) 2024-02-15 19:11:56 -06:00
Charles Kerr c14d445cf5
refactor: libtransmission Settings (#6592)
* refactor: make tr_session_settings a libtransmission::Settings

* refactor: make VariantConverter private in settings.cc
2024-02-15 11:31:09 -06:00
Charles Kerr eeea3c540f
fix: clang-tidy-19 warnings (#6597)
* fix: readability-redundant-casting warnings in libtransmission

* fix: readability-avoid-return-with-void-value warnings in libtransmission

* fix: readability-redundant-member-init warnings in libtransmission

* fix: readability-redundant-inline-specifier warnings in libtransmission

* fix: performance-avoid-endl warnings in libtransmission

* fix: bugprone-multi-level-implicit-pointer-conversion warnings in libtransmission

* fix: bugprone-switch-missing-default-case warnings in libtransmission

* fix: readability-redundant-string-cstr warnings in libtransmission

* fixup! fix: bugprone-multi-level-implicit-pointer-conversion warnings in libtransmission
2024-02-13 10:42:19 -06:00
Will Thompson 54d060cd8e
GTK: Add developer name (and screenshot caption) to metainfo (#6596)
* Add caption to screenshot in metainfo

This is used, for example, as the accessible description for the
screenshot in GNOME Software.

* Add developer_name and developer to metainfo

<developer_name> is deprecated in AppStream 1.0 but is more widely
supported by Flathub and software centres such as GNOME Software and (I
believe) KDE's Discover.
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-developer_name

<developer> is the newer tag, introduced in AppStream 1.0.
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-developer

Add both, with the same value.
2024-02-12 22:38:48 -06:00
Mrnikifabio f06cb37c06
feat: added `sleep-per-seconds-during-verify` to settings.json (#6572)
* feat: added `sleep-per-seconds-during-verify` to settings.json

* Ensuring `sleep_per_seconds_during_verify > 0` in `verify_torrent` for better performance

* `#include` list reordered alphabetically

* fix: `[readability-inconsistent-declaration-parameter-name]` warning
2024-02-12 09:30:40 -06:00
Yat Ho cf84afda8c
perf: followup improvements to `3.00` Wishlist (#6589)
* refactor: replace `small:set` with `small::vector`

* perf: faster `Wishlist::resort_piece()`

* refactor: PImpl idiom
2024-02-11 21:13:59 -06:00
Cœur 564d813b41
fix crash on empty filedescriptor after `accept` (#6585) 2024-02-11 20:40:41 -06:00
Cœur 3f71114691
feat: support multiple magnets on the same line (#6465) 2024-02-11 19:05:03 -06:00
Cœur ee1e762394
chore: crash report messages are now unsupported (#6583) 2024-02-10 21:15:31 -06:00
Cœur 9bc8ed8e46
fix: right const (#6588) 2024-02-08 23:54:59 -06:00
Charles Kerr 340d0d4966
refactor: add libtransmission::Settings (#6575)
* refactor: add libtransmission::Settings

* refactor: move RPC server's settings into tr_rpc_server::Settings

* build: update project.pbxproj

---------

Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2024-02-07 10:14:47 -06:00
Yat Ho 168d56cefc
perf: restore `3.00` wishlist with cached candidates (#6549)
* feat: rewrite Wishlist to cache candidates

* feat: implement mediator and observers

* feat: rewrite existing tests to work for current implementation

* fix: incorrect block spans for existing tests

* feat: add new tests for new features

* fix: clang shadow warning

* fix: heap-use-after-free in tests

* fixup! feat: rewrite Wishlist to cache candidates

* chore: update comment

* code review: reserve vector memory

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-02-05 00:14:34 -06:00
Yat Ho ca11c33d05
fix: various DHT bugs (#6569)
* fix: unconditionally send DHT Port msg if supported

* chore: add "maybe" to dht add_node functions

* feat: change `bind-address-ipv*` defaults to empty string

* chore: housekeeping

* fix: initialise DHT node id with random bytes

* chore: housekeeping
2024-02-04 12:18:01 -06:00
Cœur 1c71ba5c83
Fix clang-format const position (#6562) 2024-02-03 22:15:27 -06:00
Cœur 81008a1692
only use a single concurrent queue for timeMachineExclude instead of one queue per torrent (#6523)
* only use a single concurrent queue for timeMachineExclude instead of one queue per torrent

* moving to +initialize for now (will become a `static let` in Swift anyway)

* DISPATCH_QUEUE_SERIAL because DISPATCH_QUEUE_CONCURRENT is limited to 64 simultaneous torrent dispatch_async

* `static` is better than `global`, to make it private to a single compilation unit
2024-01-28 22:49:06 -06:00
Charles Kerr a51f08e532
perf: prefer small containers (#6542)
* perf: make pref_is_savable() constexpr

* refactor: use std::vector in tr_torrents::removedSince()

* chore: remove unused typedef in OptionsDialog

* perf: use std::vector in tr_num_parse_range()

* perf: use small::max_size_set in FileTreeItem::update()

* perf: use small:set in Wishlist::next()

* perf: use small:map in FilterBar

* perf: use small::map for counts in tr_logAddMessage()

* perf: use small::max_size_map in FileTreeModel::twiddleWanted()

perf: use small::max_size_map in FileTreeModel::twiddlePriority()

* perf: use a std::array instead of std::map in TorrentFilter::update()

* perf: use a std::array instead of std::map in TorrentSorter::set_mode()

* perf: use a std::array instead of std::map in TorrentSorter::update()

* perf: use small::set in Application::Impl::on_rpc_changed_idle()

* perf: use std::array for MessageLogColumnsModel::level_names_

* fixup! perf: use std::array for MessageLogColumnsModel::level_names_

* fixup! perf: use small::map for counts in tr_logAddMessage()
2024-01-27 09:33:12 -06:00
Mike Gelfand 9f77ef9c7a
Use native file chooser dialogs (GTK client) (#6545) 2024-01-22 00:24:28 +00:00
Yat Ho 32ef92e7a7
feat: do separate IPv4 and IPv6 port checks in Qt and GTK Client (#6525)
* fix: specify `port-test` ip protocol in response when possible

* feat: IPv4 and IPv6 port test in Qt Client

* feat: shorten timeout of `port-test`

* feat: IPv4 and IPv6 port test in Gtk Client

* chore: housekeeping

* refactor: remove IP protocol error message

* code review: mikedld gtk

* feat: return tag in qt rpc response

* code review: mikedld qt

* feat: move port test button up alongside spin button

* fixup! code review: mikedld gtk

* fixup! code review: mikedld qt

* code review: port status initial text

* feat: decouple ipv4 and ipv6 status updates (GTK)

* feat: decouple ipv4 and ipv6 status updates (Qt)

* code review: unknown protocols are non-pending

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* code review: simplify status text when the statuses are the same

* Revert "feat: return tag in qt rpc response"

This reverts commit 2a022c2bb0ee7ddad81f8176839cf0d043422368.

* code review: add translation context for status text (GTK)

* code review: move `port_test_pending_` to `Impl` (GTK)

* fixup! code review: move `port_test_pending_` to `Impl` (GTK)

---------

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2024-01-21 16:50:26 -06:00
Mike Gelfand 29a566664a
Use semi-transparent color for inactive torrents (#6544) 2024-01-21 16:13:51 -06:00
Yat Ho 08b2fa7e35
fix: restore `files-wanted` argument of `torrent-set` (#6534)
* chore: drop redundant if branch

* chore: housekeeping

* refactor: always keep error message as the second

* fix: restore `files-wanted` argument of `torrent-set`
2024-01-21 14:41:13 -06:00
Geoffrey Bonneville 7030b53e2e
android patches for ndk (#6024)
* android patches for ndk

* Update libtransmission/file-capacity.cc

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* TrMacros: Move common & android vars

* Build android in CI

* Use vcpkg packages for curl & openssl

* Update CI for android

* Fix ndkVersion used with gradle

* Restore actions triggers events

* CMakeLists: Remove cond where curl is not found

* Use vcpkg tag instead of commit hash

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* TrMacros.cmake: clean unused variables & add vcpkg cond

* Remove quotes around VcpkgAndroid inclusion

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* actions: split steps to install vcpkg packages

* Build for android arm64

* actions: add make-android condition

* Revert "Use vcpkg tag instead of commit hash"

This reverts commit 65819026b1.

* build.gradle: use cmake version 3.22.1

* actions: use vcpkg 2024.01.12

* actions: Add ninja-build dependency

---------

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2024-01-21 15:27:24 +00:00