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
Mike Gelfand
eeb82b2fd3
Adjust theme icons lookup logic to resemble that of GTK (Qt client) ( #2288 )
...
Look for RTL and symbolic icon variants for each icon that we load. The
only exception here is Transmission's own icons, where it doesn't make
sense (the way I see it).
2021-12-09 11:13:04 +03:00
Charles Kerr
ab0c49859e
refactor: add tr_torrentTrackers() ( #2282 )
...
* refactor: add tr_torrentTrackers()
2021-12-08 10:55:52 -06:00
Charles Kerr
0a85c3aaa4
fixup! refactor: make parts of tr file private ( #2241 ) ( #2281 )
...
fix: crash regression in GTK client details dialog
2021-12-07 19:03:32 -06:00
Matt Joiner
76719bf34c
Reject cancels when fast extension enabled ( #2275 )
...
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-12-07 16:18:56 -06:00
Charles Kerr
c46ce2da06
refactor: add tr_torrentWebseed(), tr_torrentWebseedCount() ( #2277 )
...
* refactor: add tr_torrentWebseedCount()
2021-12-07 12:11:28 -06:00
Mike Gelfand
89b0362bf2
Include SVG support in Windows builds
2021-12-07 08:39:12 +00:00
FX Coudert
c4b9a5b53a
Change accent color to match macOS red choice
2021-12-07 09:16:53 +01:00
Charles Kerr
bfbca961d4
refactor: remove assigned-but-unused tr_info.originalName ( #2276 )
2021-12-07 00:37:34 -06:00
Charles Kerr
5096bbae9b
refactor: add tr_torrent::file() ( #2274 )
...
* refactor: add tr_torrent::fileCount()
2021-12-06 22:18:17 -06:00
Mike Gelfand
41550bf17e
Avoid crash on null scrape url in rpcimpl.cc
2021-12-06 21:30:41 +00:00
Charles Kerr
867a131e1d
refactor: add tr_torrent::fileCount() ( #2273 )
...
Provide an accessor to get a torrent's file count.
This is an incremental step towards making tr_torrent's impl private.
2021-12-06 15:26:04 -06:00
Charles Kerr
e2be142ad6
fix: new warnings ( #2270 )
...
* fix: avoid potential resource leak in metainfo test
Xref: https://scan5.coverity.com/reports.htm#v48014/p10174/fileInstanceId=205022335&defectInstanceId=52337396&mergedDefectId=1494638
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX2MsJ_lWODkx6cuASq6&open=AX2MsJ_lWODkx6cuASq6
* fix: omit-redundant-override-specifier warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX2MsJ5GWODkx6cuASq5&open=AX2MsJ5GWODkx6cuASq5
* fix: improper-use-of-negative-value warning
Xref: https://scan5.coverity.com/reports.htm#v48014/p10174/fileInstanceId=205020121&defectInstanceId=52337394&mergedDefectId=1494639
* fix: unchecked return value warning
Xref: https://scan5.coverity.com/reports.htm#v48014/p10174/fileInstanceId=205020168&defectInstanceId=52304887&mergedDefectId=1491438
* fix: potential-divide-by-zero warning
Xref: https://scan5.coverity.com/reports.htm#v48014/p10174/fileInstanceId=205020106&defectInstanceId=52337395&mergedDefectId=1494438
2021-12-05 21:12:21 -06:00
Mike Gelfand
1bc10e3706
Use QFontMetrics::size instead of QFontMetrics::boundingRect
2021-12-05 23:32:19 +00:00
Mike Gelfand
ff7564dc23
Squash consecutive path separators on Windows ( #2268 )
...
This avoids ERROR_INVALID_NAME ("The filename, directory name, or volume
label syntax is incorrect") errors since such normalization doesn't
happen automatically for "\\?\"-prefixed paths.
Fixes : #1791
2021-12-05 16:32:39 +03:00
Charles Kerr
c656bee061
refactor: add tr_saveFile() ( #2267 )
...
* refactor: add tr_saveFile()
* refactor: add tr_ctorSaveContents()
2021-12-04 19:32:35 -06:00
Charles Kerr
cc4cf1da5a
fixup! refactor: use cpputf for utf8 validation and conversion ( #2251 ) ( #2264 )
...
silence a nullptr-dereference warning
2021-12-03 18:07:17 -06:00
Charles Kerr
e5e11e3c83
fixup! fix: sonarcloud warnings ( #2260 ) ( #2263 )
...
the scope of the buf variable was narrowed too far
2021-12-03 17:20:39 -06:00
Charles Kerr
2977636d58
fix: sonarcloud warnings ( #2260 )
...
* fix: add-explicit-keyword-to-constructor warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuB-2farvsyMPiZl&open=AX1tyuB-2farvsyMPiZl
* fix: use a structured binding declaration
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuHH2farvsyMPiZm&open=AX1tyuHH2farvsyMPiZm
* Fix implicit-conversion-loses-precision warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuH22farvsyMPiZn&open=AX1tyuH22farvsyMPiZn
* fix use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuO42farvsyMPiZw&open=AX1tyuO42farvsyMPiZw
* fix implicit-conversion-loses-precision warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuO42farvsyMPiZs&open=AX1tyuO42farvsyMPiZs
* fix: implicit-conversion-loses-precision warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuO42farvsyMPiZt&open=AX1tyuO42farvsyMPiZt
* fix handle-this-exceeption-or-do-not-catch-it warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1y7t12cIz3krp3mVpV&open=AX1y7t12cIz3krp3mVpV
* fix make-this-variable-a-reference-to-const warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1y7t12cIz3krp3mVpW&open=AX1y7t12cIz3krp3mVpW
* fix replace-redundant-type-with-auto warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1y7t12cIz3krp3mVpY&open=AX1y7t12cIz3krp3mVpY
* Fix use-try_emplace-instead-of-emplace warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0WPk3QwxvzFbF6whWN&open=AX0WPk3QwxvzFbF6whWN
* Fix: make-this-a-pointer-to-const warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0bZPUXjI_aUyxGBxB4&open=AX0bZPUXjI_aUyxGBxB4
* Fix use-std::make_unique warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0WPk0twxvzFbF6whWC&open=AX0WPk0twxvzFbF6whWC
* Fix: replace-push_back-with-emplace_back warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0BraL_0QLXO0pQ_Bfv&open=AX0BraL_0QLXO0pQ_Bfv
* Fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0bZPXajI_aUyxGBxB8&open=AX0bZPXajI_aUyxGBxB8
* Fix: replace-redundant-type-with-auto warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0bZPXajI_aUyxGBxB9&open=AX0bZPXajI_aUyxGBxB9
* Fix: replace-emplace-with-try_emplace warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0bZPXajI_aUyxGBxB_&open=AX0bZPXajI_aUyxGBxB_
* Fix: extract-assignment-from-operation warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0bZPXajI_aUyxGBxCA&open=AX0bZPXajI_aUyxGBxCA
* Fix use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1op6_hUBCnp-Grmra8&open=AX1op6_hUBCnp-Grmra8
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0L8qgMUnpKTxYiu5CN&open=AX0L8qgMUnpKTxYiu5CN
* Revert "Fix use-std::make_unique warning"
This reverts commit 463a742f34
.
* fix: make-parameter-a-pointer-to-const warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX06St241usi2gyYkPTZ&open=AX06St241usi2gyYkPTZ
* fix: make-parameter-a-pointer-to-const warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX06St241usi2gyYkPTa&open=AX06St241usi2gyYkPTa
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX01Itn2f_SST5i7BN1o&open=AX01Itn2f_SST5i7BN1o
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AXziv55-MuQoG-Y-NgLX&open=AXziv55-MuQoG-Y-NgLX
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0_a_JGNJn7rAzml_68&open=AX0_a_JGNJn7rAzml_68
* fix: replace-redundant-type-with-auto warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AXzyMRYbK9dvryvWm8XA&open=AXzyMRYbK9dvryvWm8XA
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AXziv52fMuQoG-Y-NgLW&open=AXziv52fMuQoG-Y-NgLW
2021-12-01 17:11:57 -06:00
Charles Kerr
933990fbfc
refactor: use utf8::unchecked::replace_invalid ( #2259 )
...
This works around a false Coverity uncaught-throw warning
Xref: https://scan5.coverity.com/reports.htm#v48014/p10174/fileInstanceId=204756586&defectInstanceId=52315575&mergedDefectId=1494566
2021-12-01 15:49:11 -06:00
Charles Kerr
0583cca414
chore: update caniuse in web client ( #2258 )
...
This silences a yarn warning about caniuse being out-of-date
2021-12-01 14:22:11 -06:00
Charles Kerr
b61b1e2c16
test: add regression tests for transmission-show ( #2255 )
...
* fix: replace non-portable strftime args
* test: add regression tests for transmission-show
2021-12-01 13:28:24 -06:00
Charles Kerr
ee83859bdc
refactor: getPeersToClose returns a vector ( #2253 )
2021-11-30 21:07:09 -06:00
Charles Kerr
bbe49639d6
refactor: use cpputf for utf8 validation and conversion ( #2251 )
...
* refactor: use cpputf for utf8 validation and conversion
2021-11-30 15:13:56 -06:00