Charles Kerr
0b095dc258
fix: sonarcloud warnings ( #2350 )
...
* fix: use-init-statement sonarcloud warning
* fix: use-init-statement sonarcloud warning
* fix: conversion-loses-precision sonarcloud warning
* fix: use std::string_view::npos sonarcoud warning
* fix: refactor code to not nest more than 3x sonarcloud warning
* fix: conversion-loses-precision sonarcloud warning
* fix: use init-statement sonarcloud warning
* fix: global variables should be const sonarcloud warning
* fix: conversion-loses-precision sonarcloud warning
* refactor: reduce complexity in doScrape()
2021-12-26 18:32:36 -06:00
Charles Kerr
6149870540
refactor: remove tr_file.priv ( #2349 )
2021-12-26 16:04:20 -06:00
Charles Kerr
fd96a9270b
refactor: remove tr_file.offset ( #2347 )
2021-12-26 12:43:27 -06:00
Charles Kerr
af183b1423
chore: remove tr_pieceOffset() ( #2346 )
2021-12-26 11:25:51 -06:00
Charles Kerr
a515c1d94b
refactor: use tr_torrent_metainfo in tr ctor ( #2345 )
2021-12-26 10:25:07 -06:00
Charles Kerr
a505447454
refactor: use tr_torrent_metainfo in makemeta tests ( #2344 )
2021-12-26 08:30:24 -06:00
Charles Kerr
3f8cf63e59
refactor: use tr_torrent_metainfo in mac client ( #2343 )
2021-12-25 21:12:32 -06:00
Charles Kerr
68582d2ca6
refactor: use tr_torrent_metainfo in transmission-qt ( #2342 )
2021-12-25 17:48:40 -06:00
Charles Kerr
bc4f513191
refactor: use tr_torrent_metainfo in transmission-show ( #2341 )
2021-12-25 16:41:18 -06:00
Charles Kerr
7c87cb36eb
refactor: tr_torrent_metainfo ( #2340 )
...
* refactor: add tr_torrent_metainfo class
Can be used for parsing bencoded .torrent data without instantiating
a tr_torrent. This will be used in all the places where client code
needs to test a .torrent file for validity / to add a preview window
before adding the torrent.
2021-12-25 15:21:13 -06:00
Charles Kerr
0e321c2d21
fix: clang warnings ( #2339 )
...
* fix: comparison-is-always-false warning
* fix: C/C++ mixing (memset() to clear a C++ object)
2021-12-25 11:22:12 -06:00
Charles Kerr
b62b8f28bf
fix: exit time dtor warnings ( #2338 )
2021-12-24 20:07:33 -06:00
Charles Kerr
b058daff4b
refactor: change tr_torrentNew() args ( #2337 )
2021-12-24 16:05:17 -06:00
Charles Kerr
f3228e9670
refactor: further decouple tr_torrent and tr_info ( #2336 )
2021-12-24 15:12:33 -06:00
Charles Kerr
deee2b043e
refactor: take string_view in tr_loadFile(), tr_saveFile() ( #2335 )
2021-12-24 13:37:34 -06:00
Charles Kerr
33553c5331
refactor: move tr_ioFindFileLocation() to tr_file_piece_manager ( #2334 )
2021-12-24 00:39:55 -06:00
Charles Kerr
dd1379b0b6
refactor: add tr_interned_string ( #2332 )
2021-12-23 11:16:05 -06:00
Charles Kerr
bd68d3a2fd
refactor: use tr_sha1_digest_t everywhere ( #2330 )
2021-12-21 16:14:15 -06:00
Charles Kerr
7ca0b4cc25
fix: sonarcloud ( #2327 )
2021-12-17 14:48:02 -06:00
Charles Kerr
37a8046ed5
fix: more sonarcloud warnings ( #2324 )
2021-12-16 23:47:51 -06:00
Charles Kerr
b9406dfebb
refactor: even more torrent housekeeping ( #2323 )
2021-12-16 22:51:53 -06:00
Charles Kerr
e4a172d39c
fix: sonarcloud ( #2322 )
...
* fix: sonarcloud warning - redundant cast
* fix: sonarcloud warning - init-statement
* fix: sonarcloud warning - init-statement
* fix: sonarcloud warning - move #include to top of file
* fix: sonarcloud warning - implicit conversion loses precision
* fix: sonarcloud warning - confirm safe use of strlen
* fix: sonarcloud warning - refactor code to not nest more than three deep
* iwyu: cstring
* iwyu: algorithm
2021-12-16 16:58:58 -06:00
Charles Kerr
b93f3f0463
refactor: more tr_torrent housekeeping ( #2320 )
2021-12-16 03:43:51 -06:00
Charles Kerr
4ea2429217
refactor: tr_torrent housekeeping ( #2319 )
2021-12-16 02:49:04 -06:00
Charles Kerr
e65e0b3caa
refactor: prefer tr_strv*() even more ( #2318 )
2021-12-15 23:16:40 -06:00
Charles Kerr
2277fde4e0
refactor: prefer tr_strv*() funcs ( #2317 )
2021-12-15 20:09:46 -06:00
Charles Kerr
42b1362760
refactor: tidy libtransmission includes ( #2316 )
2021-12-15 15:25:42 -06:00
Charles Kerr
1c848cf174
refactor: add tr_info accessors to tr_torrent ( #2314 )
...
* refactor: add tr_info accessors to tr_torrent
2021-12-15 09:53:20 -06:00
Charles Kerr
d00be0dec7
refactor: tr_torrentIsSeed() -> tr_torrent::isDone() ( #2313 )
2021-12-15 01:04:26 -06:00
Charles Kerr
68518bc307
refactor: make some tr_torrentFoo() methods member functions ( #2312 )
2021-12-14 23:48:56 -06:00
Charles Kerr
1e20d676c1
refactor: make tr_torrentInfo() private ( #2285 )
...
* refactor: make tr_torrentInfo() private
2021-12-14 15:59:44 -06:00
Charles Kerr
656df477f2
refactor: add tr_announce_list ( #2308 )
...
* refactor: add tr_announce_list (#2308 )
2021-12-14 14:59:40 -06:00
Mike Gelfand
3e072f9bd4
Fix most of critical issues reported by Sonar (GTK client) ( #2309 )
...
* (C++) Macros should not be used to define constants
* (C++) Memory should not be managed manually
* (C++) "void*" should not be used in typedefs, member variables, function parameters or return type
* (C++) When the "Rule-of-Zero" is not applicable, the "Rule-of-Five" should be followed
* (C++) "switch" statements should have "default" clauses
* (C++) "explicit" should be used on single-parameter constructors and conversiosn operators
* (C++) Non-const global variables should not be used
2021-12-14 11:43:27 +03:00
Mitch Livingston
7015f48798
Merge pull request #2306 from nevack/nevack/macos-info-window-fixup
2021-12-13 08:03:47 -05:00
Dzmitry Neviadomski
e73395e531
[macOS] Use old icon name for Square Grid to support older macOS
...
`square.grid.3x3.fill.square` is deprecated name for `square.grid.3x3.square`.
The former is available on macOS 11.0+, while the latter is for macOS 12.0+.
They are the same visually.
Fixes this report https://github.com/transmission/transmission/pull/2269#issuecomment-991980368
2021-12-13 07:36:03 +03:00
Charles Kerr
2b3fbd93f5
refactor: tweak qt client about dialog text ( #2304 )
...
* refactor: tweak qt client about dialog text
2021-12-12 15:32:06 -06:00
Mitch Livingston
2dbfec8502
Merge pull request #2269 from nevack/nevack/macos-info-window
2021-12-12 10:19:37 -05:00
Dzmitry Neviadomski
c38ee22f7f
[macOS] Update Info window.
...
Use SF Symbols on macOS 11+
Use NSSegmentedControl instead of custom view.
Add NSImage extension to fallback loading from
assets on macOS 10.15 and older.
Also should fix sizing issues when changing pane from Options
to Files.
Fixes #2247
2021-12-12 08:24:16 +03:00
Mitch Livingston
4e3fd52b3d
Merge pull request #2278 from fxcoudert/patch-1
...
Change accent color to match macOS red choice
2021-12-11 11:05:40 -05:00
Mitch Livingston
9e69a7d68b
Merge branch 'master' into patch-1
2021-12-11 10:59:11 -05:00
Charles Kerr
de75b26e7f
fixup! multiple tracker-add/-remove ( #2284 )
...
chore: code_style.sh
2021-12-09 22:34:43 -06:00
Michal Kubiak
33de02df06
multiple tracker-add/-remove ( #2284 )
...
simple patch allowing multiple declaration in transmission-remote passing
several --tracker-add or --tracker-remove will result in extending list passed
to the transmission-deamon by each subsequent call
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-12-09 22:33:37 -06:00
Charles Kerr
cec7685a64
refactor: remove unused tr_torrent.dnd_pieces_ ( #2296 )
2021-12-09 20:54:44 -06:00
Charles Kerr
0cedfec630
fixup! refactor: add tr_torrentTrackers() ( #2282 ) ( #2294 )
...
ensure announcer tracker count is correct
2021-12-09 20:03:26 -06:00
Charles Kerr
0f92232c65
fix: memleak regressions ( #2293 )
...
* fixup! refactor: add tr_saveFile() (#2267 )
fix: memleak regression
* fixup! fixup! refactor: make parts of tr file private (#2241 ) (#2281 )
fix: memory leak regression
* fixup! refactor: use C++ inheritance for tr_peer, tr_peerMsgs, and tr_webseed (#1877 )
fix: memory leak regression
2021-12-09 18:49:30 -06:00
Mike Gelfand
e590b1cd37
Fix unbound (and unnecessary) icon cache recursion on theme icon lookup (Qt client) ( #2292 )
...
* Avoid infinite recursion if icon is missing (Qt client)
* Fix recently-introduced clang-tidy warnings (Qt client)
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-12-10 01:28:37 +03:00
Charles Kerr
f39a1e45a8
fix: crash in tr_file_priorities::filePriority() ( #2291 )
...
Fixes #2262 .
2021-12-09 15:38:18 -06:00
Charles Kerr
d5aead4b41
fix: non-portable strftime format string ( #2290 )
...
Xref: b61b1e2c16
2021-12-09 14:30:39 -06:00
Charles Kerr
b9de5bb9ca
fixup! fix: env var leak in tr_spawn_async() ( #2212 ) ( #2289 )
...
fix: fmr error with temporary strings
2021-12-09 12:39:06 -06:00
Charles Kerr
ef7ff98f03
Merge branch 'master' into patch-1
2021-12-09 11:17:44 -06:00