Commit Graph

897 Commits

Author SHA1 Message Date
Gary Elshaw d6a5f1462c
MacOS Transmission icons for QT (#3128) 2022-05-24 21:18:08 -05:00
sewe2000 4617776253
Add new information about when torrent was added to transmission in the Information Tab in transmission-qt (#3121) 2022-05-23 00:02:46 -05:00
Charles Kerr 67a078402d
fix: compiler warnings (#3123)
* fix: unused function warning tr_rpc_address_is_valid

* fix: unused variable warning old_byte_pop

* fix: method-can-be-made-static warning assertValidRules

* fix: signed-unsigned comparison warning

* fix: invalid case style warning for KBps

* chore: disable warning for static class member varaible
2022-05-22 21:22:34 -05:00
Antoine Cœur 42713c6716
OS X → macOS (#2986) 2022-04-26 09:11:44 -05:00
Antoine Cœur c708b83a3f
update documentation links (#2985) 2022-04-25 18:18:35 -05:00
Charles Kerr aa2bb367ab
chore: iwyu cleanup (#2981) 2022-04-24 20:49:52 -05:00
Charles Kerr 32f854a7cf
refactor: add a tr_port safety class (#2952) 2022-04-21 10:58:13 -05:00
Antoine Cœur bdac708762
docs: fix various typos and misspellings (#2955) 2022-04-21 09:28:38 -05:00
Charles Kerr 8c51c48472
fix: recent FTBFS in msvc (#2907)
* fix: recent FTBFS in msvc

It's happening a line in qt/WatchDir.cc where an enum named `ERROR` is
declared, so it's probably conflicting with a new `ERROR` name in some
header file. Rename ours and make at an `enum class` for good measure.

* build: fix cmake msvc warning

D9025 : overriding /W3 with /W4
2022-04-12 01:56:09 -05:00
Charles Kerr 205abbbcce
refactor: iwyu string, vector, cstdint (#2898)
* refactor: use cstdint for intX_t types

* refactor: iwyu sstring_view

* refactor: iwyu <cstring>

* refactor: iwyu <vector>
2022-04-07 20:50:26 -05:00
Charles Kerr 76f44b4b6f
fix: sonarcloud (#2868)
* refactor: make this variable const

* refactor: replace redundant type with auto

* refactor: use the nullptr literal

* refactor: replace declaration by structured binding declaration
2022-04-02 17:42:51 -05:00
Charles Kerr 1cc9da26ba
fix: sonarcloud (#2865)
* refactor: implement FileTreeItem::children_ with a std::vector

* fix: std::move should not be called on forwarding reference

* fix: uninitialized scalar variable

* fix: unchecked return value from library

* fix: dereference before null check

* fix: unchecked return value from library

* fix: unchecked return value from library

* fixup! refactor: implement FileTreeItem::children_ with a std::vector

* fix: signed-unsigned comparison in libtransmission tests

* fix: avoid unnecessary copy by using const reference

* fix: function should be declared const

* refactor: use fmt::format to build log timestamps

* fix: use init-statement to reduce variable scope

* fixup! refactor: use fmt::format to build log timestamps

* fix: remove tau_tracker destructor for rule-of-zero

* fix: remove tr_peerIo destructor for rule-of-zero

* Revert "fix: dereference before null check"

This reverts commit cd78967815.

* fix: signed-unsigned comparison in libtransmission tests

* fix: use init-statement to reduce variable scope

* fix: extract nested code block into separate method

* fix: extract nested code block into separate method

* fix: extract nested code block into separate method

* fix: use init-statement to reduce variable scope

* fix: extract nested code block into separate method

* fix: signed-unsigned comparison in libtransmission tests

* fixup! fix: extract nested code block into separate method

* fix: mark possibly-unused as [[maybe_unused]]

* fix: invalid stack memory reference in tr_found_file_t

* fix: signed-unsigned comparison in libtransmission tests
2022-04-02 09:06:02 -05:00
Charles Kerr 46cc95f72e
refactor: remove unused functions (#2863)
* refactor: annotate nodiscard, constexpr, noexcept methods

* refactor: remove unused tr_blocklistFileExists()

* refactor: remove unused tr_blocklistFileIsEnabled()

* refactor: remove unused tr_ctorGetContents

* refactor: remove unused tr_error_is_set()

* refactor: remove unused tr_handshakeGetAddr()

* refactor: remove unused tr_ctorSetLabels()

* refactor: remove unused tr_http_escape_sha1()

* refactor: remove unused tr_lpdEnabled()

* refactor: remove unused tr_ptrArrayPop()

* refactor: remove unused tr_torrentClearIdleLimitHitCallback()

* refactor: remove unused tr_torrentFindFromHash()

* refactor: remove unused tr_sha1_to_string()

* refactor: remove unused tr_torrents::get()

* refactor: remove unused tr_isEncryptionMode()

* refactor: remove unused tr_isPreallocationMode()

* refactor: remove unused tr_ptrArrayBack()

* refactor: remove unused tr_ptrArrayClear()

* refactor: remove unused tr_torrents::get()

* refactor: remove unused Session::torrentSet()

* refactor: remove unused peer_atom comparison operators

* refactor: remove unused peer_atom::compare()

* refactor: remove unused Qt variantInit(tr_variant*, unsigned)
2022-04-01 21:55:30 -05:00
Charles Kerr a250690f30
fix: sonarcloud (#2860)
* fix: break will never be executed

* fix: rewrite rimraf() to be non-throwing

* fix: conditional operation returns same value whether condition is true or false

* fix: use std::array instead of a C-style array

* fix: remove redundant access specifier

* fix: replace switch with if for readability

* fix: convert integer literal to a bool literal

* fix: replace const std::string reference to std::string_view

* fix: remove redundant access specifier

* fix: replace const std::string reference to std::string_view

* fix: remove unused parameter

* fix: remove redundant access specifier

* fix: use std::array instead of C-style array

* fix: remove redundant access specifier

* fix: replace const std::string reference with std::string_view

* fix: remove redundant access specifier

* fix: use std::array instead of C-style array

* fix: remove redundant access specifier

* fix: replace const std::string reference to std::string_view

* fix: remove redundant access specifier

* fix: merge if statement with enclosing one

* chore: clang-format

* chore: clang-format

* Revert "fix: remove redundant access specifier"

This reverts commit 054e4e7eec.

* Revert "fix: remove redundant access specifier"

This reverts commit 2c92f227e8.

* Revert "fix: remove redundant access specifier"

This reverts commit a0710202a8.

* Revert "fix: remove redundant access specifier"

This reverts commit 54da1d9397.

* Revert "fix: remove redundant access specifier"

This reverts commit f7b1777578.

* Revert "fix: remove redundant access specifier"

This reverts commit ad8e3dfff4.

* chore: revert access specifier change
2022-04-01 14:16:33 -05:00
Charles Kerr 4c2cb23c24
refactor: tr_variantToFile() takes a string_view filename (#2824)
* chore: fix shadowed variable warning

"byte" is declared by a third-party UTP header

* refactor: tr_variantFromFile, tr_variantToFile take a string_view filename
2022-03-25 22:39:08 -05:00
Charles Kerr fcc1510ecb
refactor: use fmt to build the GTK client's user-visible strings (#2788)
Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2022-03-21 09:15:48 -05:00
Charles Kerr 5df252d1e1
fix: calculate ratio as uploaded / sizeWhenDone (#2770) 2022-03-17 13:41:48 -05:00
Charles Kerr 8c598c463c
feat: better dialog when adding duplicate magnet (#2709)
Instead of giving the entire magnet link, which can be too long to be
readable, give the magnet's display name (if available) or the info hash
as a fallback.

Fixes #1217.
2022-02-25 01:19:28 -06:00
Charles Kerr 80ab910cbd
feat: update built-in speed limit settings (#2697)
Fixes #2092.
2022-02-23 20:27:28 -06:00
Mike Gelfand 50862aea31
Update CMake files with removed/added languages 2022-02-21 21:38:32 +00:00
Mike Gelfand 0265e5ffaa
Add new translations from Transifex (95% and higher)
Qt client: Portuguese
2022-02-21 21:32:25 +00:00
Mike Gelfand b2a01df64d
Sync existing translations with Transifex 2022-02-21 21:30:30 +00:00
Mike Gelfand bcc0cfa127
Sync existing translations with code 2022-02-21 21:24:50 +00:00
Charles Kerr 3780f90ef5 perf: skip some excess announce list rebuilds 2022-02-21 08:34:59 -06:00
Charles Kerr 8d5c900ee0 refactor: Qt, GTK, web client UI consistency 2022-02-21 08:34:59 -06:00
Stefan Talpalaru 7b377511a9 feat: default public trackers 2022-02-21 08:34:57 -06:00
Charles Kerr 02b6cc76d1
feat: add tr_torrentSetTrackerList(), tr_torrentGetTrackerList() (#2642)
Add a getter/setter for torrent announce URLs as text that can be copied
and pasted: one URL per line, with a blank line between tiers.

C API: tr_torrentGetTrackerList() and tr_torrentSetTrackerList()
RPC APi: `trackerList` in `torrent-get` and `torrent-set`.

This deprecates `trackerAdd`, `trackerRemove`, and `trackerEdit`
from the RPC API.
2022-02-18 11:52:01 -06:00
Charles Kerr 33cb3b0a73
revert da855a7257 (#2635)
these icons need a fallback. view-statistics does not exist on many systems.
2022-02-16 22:47:57 -06:00
Charles Kerr d772824553
fix: sonarcloud code smells (#2623)
* fix: make variable a pointer-to-const

* fix: use init-statement to reduce variable scope

* fix: implicit conversion from long to int

* fix: refactor to not nest more than 3 if|for|do|while|switch statements

* fix: make tr_session::setSocketTos() const

* fix: use array.prototype.some instead of a for loop

* refactor: use nullptr instead of NULL

* fix: oops
2022-02-13 23:44:38 -06:00
Charles Kerr 9f9b6cdaa2
feat: run script when done seeding (#2621)
* feat: add seeding-done script to core and rpc

* feat: add seeding-done script to gtk client

* feat: add seeding-done script to qt client

* feat: add seeding-done script to transmission-remote

* refactor: make Qt and GTK client text match

* test: update tests

Co-authored-by: Timothy Nibeaudeau <timothy.nibeaudeau@gmail.com>
2022-02-13 22:07:12 -06:00
Charles Kerr 96178b1a9f
feat: add support for adding torrents by raw hash values (#2608)
* Add support for adding torrents by raw hash values

Co-authored-by: vjunk <vjunk@mail.ru>
2022-02-12 22:16:55 -06:00
Charles Kerr 2410ad2fa6
feat: support webseeds in transmission-create (#2611) 2022-02-12 12:50:47 -06:00
Charles Kerr e14c7f38e5
feat: use libpsl (#2575)
Use libpsl to calculate public and private parts of URL hosts.
2022-02-12 11:30:27 -06:00
Charles Kerr a87be3762f
fix: rename 'corrupt' label for understandability (#2605)
Fixes #154. The current 'corrupt' label can confuse users to think that
there is corrupt data on the disk. The phrasing has been changed:

- Downloaded: 1.91 GB
- Corrupt DL: 22.02 MB

+ Downloaded: 1.91 GB (+22.02 MB discarded after failed checksum)
2022-02-11 01:15:10 -06:00
Charles Kerr 6383e2ff5f
feat: support dscp classes in socket iptos (#2594)
* refactor: Replace ToS with DSCP

IP TOS was superseded by DSCP in RFC 2474.

Co-authored-by: dgcampea <dgcampea@outlook.com>
2022-02-10 15:35:28 -06:00
Charles Kerr 318d60b72d
refactor: fix sonarcloud "use enum class" code smells (#2590)
* refactor: prefer constexpr over enum for GUI_PAD values

* refactor: prefer constexpr over enum for PrefsDialog values

* refactor: prefer constexpr over enum for StatsDialog values

* refactor: use enum class for GtrUnicode types

* refactor: prefer constexpr over enum for BT peer msg codes

* refactor: use enum class for TrMakemetaResult

* refactor: prefer constexpr over enum for BT metadata message types

* refactor: use enum class for AwaitingBt

* refactor: use enum class for EncryptionPreference

* refactor: use enum class for TrFormat in rpcimpl

* refactor: prefer constexpr over enum for QApp intervals

* refactor: prefer constexpr over enum for tr_resume bitfields

* refactor: prefer constexpr over enum for Qt/TrFileModel bitfields

* refactor: remove obsolete TODO comment in announce-list
2022-02-08 20:25:19 -06:00
Charles Kerr ba14ffa74c
refactor: sonarcloud "use if init" statements (#2587) 2022-02-07 23:44:31 -06:00
Charles Kerr 8afbfecadb
refactor: re-enable some clang-tidy checks in qt/ (#2585)
* chore: re-enable readability-static-accessed-through-instance test in qt

* chore: re-enable clang-diagnostic-nonportable-system-include-path check in qt/

* chore: re-enable clang-diagnostic-undefined-reinterpret-cast test in qt/

* chore: re-enable cert-err58-cpp check in qt/

* chore: re-enable clang-diagnostic-switch-enum check in qt/

* chore: re-enable modernize-return-braced-init-list check in qt/

* chore: re-enable cppcoreguidelines-pro-type-static-cast-downcast check in qt/

* chore: re-enable cppcoreguidelines-pro-type-cstyle-cast check in qt/

* refactor: re-enable cppcoreguidelines-init-variables check in qt/

* chore: re-enable cppcoreguidelines-pro-type-vararg check in qt/

* chore: remove explicit disable of clang-diagnostic-old-style-cast check in qt/

* chore: re-enable bugprone-implicit-widening-of-multiplication-result check in qt/
2022-02-07 21:56:04 -06:00
Charles Kerr ebb2ab6aee
chore: update license spdx abbreviations (#2582)
Use SPDX license list 3.0 terminology: replace deprecated identifiers
GPL-2.0" and "GPL-3.0" with "GPL-3.0-only" and "GPL-3.0-only".
2022-02-07 10:25:02 -06:00
Charles Kerr 4455673bed
fix: some use-init-statement sonarcloud warnings (#2566) 2022-02-03 07:02:11 -06:00
Charles Kerr 878405f862
Revert "fix: sonarcloud (#2558)" (#2562)
This reverts commit 8b9483f7fb.
2022-02-01 11:30:51 -06:00
Charles Kerr 8b9483f7fb
fix: sonarcloud (#2558)
* fix: add const modifier for functions

* fix: many sonarcloud use-init-statement warnings
2022-01-31 22:46:27 -06:00
Charles Kerr 4c4b2714f1
feat: remember tab selection in Details dialog (#2506) 2022-01-24 23:16:33 -06:00
Charles Kerr e83a57efa3
refactor: re-enable some clang-tidy rules (#2498) 2022-01-24 13:07:55 -06:00
Charles Kerr b5cbbb7f8f
refactor: clang-tidy 14 (#2487)
get transmission building cleanly with clang-tidy 14
2022-01-23 20:44:14 -06:00
Charles Kerr 26bb9f3440
fix: sonarcloud code smells (#2486) 2022-01-23 18:53:35 -06:00
Esa Varemo 032e01c9d8
Add the option of automatically picking up URLs from the clipboard on window focus (#1633) 2022-01-23 09:57:21 -06:00
Charles Kerr df1cca9b57
chore: update copyright years, make notices consistent (#2463) 2022-01-20 12:27:56 -06:00
Charles Kerr 3036a76beb
fix: sonarcloud code smells (#2421) 2022-01-17 12:39:50 -06:00
Charles Kerr b0ee4007ff
refactor: include cleanups (#2392)
* refactor: include <memory> when using shared_ptr or unique_ptr

* refactor: include <cstdio> iff we use it

* refactor: include <cstring> iff we use it

* refactor: include <cstdlib> iff we use it

* refactor: include <string_view> or <string> iff we use it

* refactor: include <array> iff we use it

* refactor: include <ctime> iff we use it

* refactor: include <cctype> iff we use it

* refactor: misc #include cleanups in libtransmission
2022-01-12 20:13:58 -06:00