Charles Kerr
22c14c9266
fix: sonarcloud warnings ( #4180 )
2022-11-15 10:25:12 -06:00
Mike Gelfand
f1f55cc3df
Sync translations ( #3939 )
...
* Sync translations with code
* Sync translations with Transifex
* Remove Mac menu title that isn't displayed and shouldn't be translated
* Add context to logging level strings in GTK client
* Use "µTP" consistently in code
* Use ellipsis instead of three docs in Qt client strings
* Close HTML tags in blocklist-related strings
* Remove trailing space from a translatable string in Qt client
* Add missing plural forms for English strings in Qt client
* Fix spelling: metaInfo -> metainfo
2022-10-11 18:39:41 +03:00
Dmitry Antipov
161330ae16
refactor: add more C++ glue for the daemon ( #3815 )
...
Get rid of C-style callbacks on void pointers and convert (well, the
most of) daemon code to (somewhat more) real C++, adjust related bits.
2022-09-12 23:37:12 -07:00
Dmitry Antipov
050ee1cbbd
daemon: use signalfd-based signal handling if available ( #3778 )
...
If signalfd(2) interface is available, prefer it over traditional signal
handlers. This is mostly intended to drop dedicated signal handling thread
and hook signal processing into libevent event loop in the most natural way.
Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
2022-09-07 15:12:35 -05:00
Dmitry Antipov
44c5d3edbd
refactor: fold common daemon code into C++ class ( #3767 )
...
Fold common daemon code into Daemon class, adjust related bits.
Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
2022-09-05 16:28:15 -05:00
Charles Kerr
76a7994eef
refactor: remove tr_free() ( #3668 )
2022-08-18 09:14:12 -05:00
Charles Kerr
bfec98c323
refactor: avoid tr_new() in transmission-remote ( #3665 )
2022-08-17 20:25:42 -05:00
Charles Kerr
29f57bc296
chore: iwyu headers ( #3661 )
2022-08-17 11:08:36 -05:00
Charles Kerr
e49747ab51
feat: add tr_strvToBuf() ( #3657 )
...
* feat: add tr_getDefaultConfigDirToBuf()
* feat: add tr_getDefaultDownloadDirToBuf()
* feat: add tr_strvToBuf()
* feat: add tr_torrentFindFileToBuf()
* feat: add tr_torrentGetMagnetLinkToBuf()
* refactor: remove unused makeString() from tests
* feat: add tr_torrentFilenameToBuf()
* feat: add tr_torrentGetTrackerListToBuf()
* chore: remove obsolete comment references to tr_free
* chore: remove unused tr_strdup()
* chore: remove unused forward declarations
2022-08-16 19:28:57 -05:00
Charles Kerr
7c5862a5f5
refactor: remove tr_new, tr_free pt. 1 ( #3626 )
...
* refactor: tr_torrentGetMetadataPiece() returns an optional vector
* refactor: use tr_pathbuf in create_temp_path()
* refactor: use tr_pathbuf in win32 create_temp_path()
* refactor: use std::vector in isPeerInteresting()
* refactor: remove tr_new0 from tr_peerMgrPeerStats()
* refactor: remove tr_new0 from rechokeUploads()
* refactor: silence clang nullptr dereference warning
* refactor: make tr_natpmp a C++ class
* refactor: use std::string in tr_log_message
2022-08-11 19:59:58 -05:00
Charles Kerr
c66303fae2
refactor: watchdir ( #3606 )
2022-08-10 08:34:51 -05:00
Charles Kerr
0da1cbb6ec
fix: 3508 location invalidation ( #3511 )
...
* Revert "refactor: remove tr_sessionGetConfigDir() (#3506 )"
This reverts commit c50da43ae0
.
* Revert "fix: do not leak in tr_getWebClientDir() (#3502 )"
This reverts commit 5a75e37033
.
2022-07-22 00:52:48 -05:00
Charles Kerr
c50da43ae0
refactor: remove tr_sessionGetConfigDir() ( #3506 )
...
* refactor: remove tr_sessionGetConfigDir() from GTK client
* refactor: remove tr_sessionGetConfigDir() from daemon
* refactor: remove tr_sessionGetConfigDir()
* refactor: remove tr_getTorrentDir()
* fixup! refactor: remove tr_sessionGetConfigDir()
2022-07-21 20:12:45 -05:00
Charles Kerr
c0bb2d40f1
refactor: add pathbuf and std::string-friendly helpers to tr_sys file and path funcs ( #3118 )
...
* refactor: add sv-friendly tr_sys_dir_create() variant
* refactor: add sv-friendly tr_sys_path_get_info() variant
* refactor: add sv-friendly tr_sys_path_exists() variant
* refactor: add sv-friendly tr_sys_path_remove() variant
* refactor: add sv-friendly tr_sys_path_rename() variant
* fixup! refactor: add sv-friendly tr_sys_path_rename() variant
2022-05-21 20:17:00 -05:00
Charles Kerr
5b6f0a52fd
fixup: minor log string formatting changes ( #2913 )
...
* fixup! fix: sonarcloud (#2865 )
fix: log time format string
* fix: formatting changes
* fixup! refactor: remove tr_strvJoin() (#2896 )
fix: daemon logging
Co-authored-by: Catadropa <catadropa@users.noreply.github.com>
2022-04-13 23:19:18 -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
31c65eec1f
refactor: remove tr_strvJoin() ( #2896 )
2022-04-07 17:26:59 -05:00
Pierre Carru
32cff69213
torrent-daemon: watchdir can use .magnet files ( #1328 )
2022-04-03 21:14:44 -05:00
Charles Kerr
392e511f7e
refactor: remove tr_snprintf() pt 1 ( #2867 )
...
* refactor use fmt instead of tr_snprintf in remote.cc
* refactor use fmt instead of tr_snprintf in daemon.cc
* refactor use fmt instead of tr_snprintf in cli.cc
2022-04-02 14:34:29 -05:00
Charles Kerr
71ad42b1ef
refactor: make err arg optional in tr_sys_* funcs ( #2827 )
2022-03-27 12:37:29 -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
7b837bca1f
fixup! refactor: remove deep logging ( #2749 ) ( #2785 )
...
handle new log levels in daemon cli invocation
2022-03-18 14:15:43 -05:00
Charles Kerr
fa8aaf7631
refactor: remove remaining vararg log messages ( #2776 )
2022-03-17 17:39:06 -05:00
Charles Kerr
54ef7341a2
refactor: fmt pt 4 ( #2774 )
...
Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2022-03-16 19:23:44 -05:00
Charles Kerr
0be920156b
refactor: fmt part 3 ( #2773 )
2022-03-15 19:51:36 -05:00
Charles Kerr
a942c67199
refactor: use fmt ( #2758 )
...
* deps: use fmt (8.1.1 tag) to build log strings
Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2022-03-13 23:43:35 -05:00
Charles Kerr
d2f8e1d4e0
refactor: set logging levels ( #2755 )
2022-03-11 15:09:22 -06:00
Charles Kerr
af339a15ed
refactor: remove deep logging ( #2749 )
...
* refactor: remove "deep logging"
2022-03-09 23:51:14 -06:00
Stefan Talpalaru
7b377511a9
feat: default public trackers
2022-02-21 08:34:57 -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
df1cca9b57
chore: update copyright years, make notices consistent ( #2463 )
2022-01-20 12:27:56 -06:00
Charles Kerr
884135d853
fix: sonarcloud ( #2356 )
...
* refactor: replace #define with constexpr in some utils
* fix: use-std-string-instead-of-c-array sonarcloud warning
* fix: use init-statement sonarcloud warning
* fix: explain-empty-function sonarcloud warning
* fix: move #include directive to top sonarcloud warning
* fix: replace-void-ptr-arg-with-more-meaningful-type sonarcloud warning
* fix: replace-redundant-type-with-auto warning
* fix: use-init-statement sonarcloud warning
* fix: make type a pointer-to-const sonarcloud warning
* fix: cli tyop
* fix: replace-redundant-type-with-auto warning
* fix: use-init-statement sonarcloud warning
* fix: replace-redundant-type-with-auto warning
* fix: use-init-statement sonarcloud warning
* fix: replace-redundant-type-with-auto warning
* fix: make type a pointer-to-const sonarcloud warning
* fix: make type a pointer-to-const sonarcloud warning
* fix: replace-redundant-type-with-auto warning
* refactor: replace #define with constexpr in rpcimpl
2021-12-28 11:23:47 -06:00
Charles Kerr
88f9704eed
refactor: remove varargs code in tr_sys_file ( #2354 )
2021-12-28 09:08:04 -06:00
Charles Kerr
fa35b8ad39
refactor: use std::string in tr_variantToStr() ( #2351 )
...
* refactor: use std::string in tr_variantToStr()
2021-12-27 16:47:25 -06:00
Charles Kerr
a515c1d94b
refactor: use tr_torrent_metainfo in tr ctor ( #2345 )
2021-12-26 10:25:07 -06:00
Charles Kerr
b058daff4b
refactor: change tr_torrentNew() args ( #2337 )
2021-12-24 16:05:17 -06:00
Charles Kerr
7ca0b4cc25
fix: sonarcloud ( #2327 )
2021-12-17 14:48:02 -06:00
Charles Kerr
73edd7b642
refactor: remove tr_variantDictFindStr() ( #2180 )
...
* refactor: remove tr_variantDictFindStr
2021-11-15 23:20:06 -06:00
Charles Kerr
b1aeaa3dcc
refactor: remove tr_variantDictFindStr() from transmission-daemon ( #2165 )
...
* refactor: remove tr_variantDictFindStr from transmission-daemon
2021-11-14 22:49:56 -06:00
Charles Kerr
6571be2b95
feat: add tr_strvPath() ( #2134 )
...
* feat: add tr_strvJoin
* feat: add tr_strvPath
2021-11-12 18:10:04 -06:00
Charles Kerr
c472cbd88d
refactor: only use [[maybe_unused]] if arg might be used ( #2033 )
...
* refactor: [[maybe_unused]] iff arg _might_ be used
If the arg is never used, comment out its name.
If the arg is _sometimes_ used e.g. with ifdefs, use [[maybe_unused]].
2021-10-24 11:41:54 -05:00
Charles Kerr
236a0965fa
refactor: tr_variant*Str() functions now take a std::string_view ( #1990 )
...
* refactor tr_variant*Str functions now take a std::string_view
* refactor: tr_torrentPrimaryMimeType returns a string-view
2021-10-19 21:30:50 -05:00
Charles Kerr
567f1e48c8
tr_quark_new() now takes a std::string_view ( #1961 )
2021-10-15 08:28:47 -05:00
Charles Kerr
1fb5a79813
refactor: use maybe unused attribute ( #1918 )
...
* refactor: replace TR_UNUSED with [[maybe_unused]]
2021-10-10 11:52:26 -05:00
Charles Kerr
003685b40a
refactor: use nullptr instead of NULL ( #1884 )
...
* refactor: use nullptr instead of NULL.
No functional changes; just more C++ification
2021-10-06 11:32:17 -05:00
Charles Kerr
1ee88c019f
refactor: port daemon and utils to C++ ( #1825 )
...
* refactor: compile daemon/ and utils/ as C++
Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2021-09-21 18:03:39 -05:00