Charles Kerr
3b019ada3d
refactor: remove redundant assertions ( #2009 )
2021-10-21 19:02:38 -05:00
Charles Kerr
8cdc2c633e
refactor: replace tr_torrentFiles() with tr_torrentFileProgress() ( #1994 )
...
* refactor: s/tr_torrentFiles/tr_torrentFileProgress
Replace tr_torrentFiles() with a new function, tr_torrentFileProgress().
tr_torrentFiles() heap-allocated an array of progress structs. There is
nothing intrinsic in tr_torrent making batch computation more efficient,
so this PR replaces it with tr_torrentFileProgress(), a per-file variant
that doesn't use the heap.
2021-10-21 13:31:03 -05:00
Charles Kerr
b0fd4b474a
refactor: cppcoreguidelines-init-variables pt. 9 ( #1997 )
...
* refactor: fix uninit variable warnings in getopt, torrent-magnet
2021-10-21 12:40:36 -05:00
Charles Kerr
850b3caa61
refactor: prefer constexpr over enum for non enumerated constants ( #1996 )
...
refactor: prefer constexpr over enum for non-enumerated constants
2021-10-20 19:39:05 -05:00
Charles Kerr
241dc34019
fixup! refactor: tr_variant*Str() functions now take a std::string_view ( #1990 ) ( #1999 )
2021-10-20 17:43:31 -05:00
Charles Kerr
32395056e2
refactor: cppcoreguidelines-init-variables pt. 8 ( #1993 )
...
* refactor: fix uninit var warnings in rpcimpl
2021-10-20 11:31:20 -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
0b1e12ac5b
refactor: fix uninit var warnings in upnp, utils, verify, watchdir ( #1989 )
2021-10-19 11:09:38 -05:00
Oleg Chashko
83ec912c5d
Fix & Added for #443 ( #1991 )
...
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-10-19 09:15:37 -05:00
Charles Kerr
d7773c47b6
fix: crash on torrent with 65536 blocks per piece ( #1988 )
...
Fixes #1411 .
2021-10-18 19:25:00 -05:00
Daniel Kamil Kozar
77b11232f2
Add support for creating torrents with a source flag ( #443 )
...
* Add support for creating torrents with a source flag
* Add the source flag functionality for Mac OSX
* Source flag should be a part of the info dictionary
* Address review comments
* Rename "sourceFlag" to "source" since "Flag" is usually reserved for booleans.
* Free the "source" pointer in tr_metainfoFree.
* Add information about transmission-create argument to its manpage.
* Replace all occurences of "sourceFlag" with "source" and use "Source tag" in UI
* Settle on just "Source" in UI
* The last usage of "flag" hopefully bites the dust! ;-)
* Add a missing free for the source in tr_metainfoFree
* Add a "source" field to the torrent-get RPC method
* uncrustify
* Test for torrents having different infohashes due to different source flags.
This is the whole point of this feature, so it makes sense to test it.
* case is important
* try to incorporate the macosx xml changes
2021-10-18 18:05:39 -05:00
Mike Gelfand
bf41e1487a
Switch from gtk to gtkmm ( #1969 )
...
* Gtk to gtkmm: main.cc
* Gtk to gtkmm: details.cc
* Gtk to gtkmm: tr-window.cc
* Gtk to gtkmm: tr-prefs.cc
* Gtk to gtkmm: open-dialog.cc
* Gtk to gtkmm: file-list.cc
* Gtk to gtkmm: filter.cc
* Gtk to gtkmm: torrent-cell-renderer.cc
* Gtk to gtkmm: msgwin.cc
* Gtk to gtkmm: makemeta-ui.cc
* Gtk to gtkmm: relocate.cc
* Gtk to gtkmm: stats.cc
* Gtk to gtkmm: dialogs.cc
* Gtk to gtkmm: hig.cc
* Gtk to gtkmm: favicon.cc
* Gtk to gtkmm: icons.cc
* Gtk to gtkmm: tr-icon.cc
* Gtk to gtkmm: actions.cc
* Gtk to gtkmm: notify.cc
* Gtk to gtkmm: util.cc
* Gtk to gtkmm: tr-core.cc
* Gtk to gtkmm: conf.cc
* Glibmm <2.62 compatibility (missing Glib::ustring::sprintf)
* Glibmm <2.56 compatibility (missing Glib::RefPtr<>::get)
* Bump glibmm to 2.50.1+ (C++17 fix in Glib::Variant)
* Fix empty timestamps on message log export (broken by #1444 )
* Fix LGTM build issues
* Review fixes
2021-10-18 23:22:31 +03:00
Charles Kerr
9f639868b8
perf: remove unused variables in qt details dialog ( #1987 )
2021-10-18 11:25:43 -05:00
Charles Kerr
462651bb8e
refactor: rpcimpl.cc getTorrents() returns a std::vector ( #1986 )
...
* refactor: rpcimpl.cc getTorrents() returns a std::vector
* refactor: tr_torrentQueueMove*() uses std::vector
2021-10-18 09:48:45 -05:00
Charles Kerr
2e50383760
refactor: cppcoreguidelines-init-variables pt. 6 ( #1979 )
...
* refactor: fix uninit var warnings in magnet.cc
* refactor: fix uninit var warnings in completion.cc
* refactor: fix uninit var warnings in session.cc
2021-10-18 07:51:02 -05:00
Charles Kerr
4739fd0959
fixup! Add total disk space to free-space RPC request ( #1682 ) ( #1984 )
...
fix: unused variable warning in free-space code
2021-10-17 22:04:20 -05:00
Charles Kerr
8be7f774db
fixup! tr_quark_new() now takes a std::string_view ( #1961 ) ( #1983 )
2021-10-17 20:59:08 -05:00
Charles Kerr
4b4948d26d
build: silence new clang-tidy 13 warnings ( #1982 )
...
* build: silence new clang-tidy 13 warnings
* build: remove WarningsAsErrors in libT-tests .clang-tidy
2021-10-17 19:48:33 -05:00
Charles Kerr
c6501c655c
refactor: add performance-* to libt .clang-tidy ( #1981 )
2021-10-17 16:09:58 -05:00
Charles Kerr
16e9a99fe9
refactor: clang-tidy --fix modernize-deprecated-headers ( #1980 )
2021-10-17 15:17:18 -05:00
Oleg Chashko
2bd2f0738e
fix: macOS gui with Russian l10n does not fit lines of text. ( Fixes #1963 ) ( #1973 )
...
* Fixed : #1963
* Fixed: (✕) -> Changed to (No Group) & (None)
* Fixed: Удалённое управление -> Удалённый доступ
* Удаленное управление -> Удалённый доступ
2021-10-17 13:45:25 -05:00
Charles Kerr
2bc9959dc9
refactor: cppcoreguidelines-init-variables pt. 5 ( #1970 )
...
* fix: uninitialized variables in torrent.cc
2021-10-17 12:06:00 -05:00
Charles Kerr
4aba9b623f
fix: assertion failure in bitfield::bitfield(flags, n) ( #1976 )
...
* fix: bitfield construct-from-bool-array regression
2021-10-17 10:34:36 -05:00
Mike Gelfand
de7b7a284c
Only pack PDBs on master and tags to reduce AppVeyor artifacts size
2021-10-17 14:04:18 +03:00
Mike Gelfand
08996ab4c7
Don't pack PDBs on feature branches to reduce AppVeyor artifacts size ( #1972 )
2021-10-17 02:23:48 +03:00
Charles Kerr
290f7fc71a
fix: cppcoreguidelines-init-variables pt. 4 ( #1965 )
...
* fix: uninitialized variables in resume
2021-10-16 11:17:34 -05:00
Dmytro Lytovchenko
953f07375a
Modernize bitfield.cc: Storage changes and refactor ( #1927 )
...
* Modernize bitfield.cc: Storage changed to vector of bytes, return vector from getRaw, new Span readonly memory view
Modernize bitfield.cc: Code style/review notes
Modernize bitfield.cc: Code format
* Modernize bitfield.cc: Swap end and begin in bit counting code assertion
* Modernize bitfield.cc: Rewrite states and simplify code
* Modernize bitfield.cc: Fixing the code and tests
* Modernize bitfield.cc: Fixing tests
* Modernize bitfield.cc: Formatting; +std::size, +const
2021-10-16 09:04:19 -05:00
Charles Kerr
43ad1346eb
refactor: tr_torrentInfoGetMagnetLink now takes a std::string_view ( #1968 )
...
* refactor: tr_torrentInfoGetMagnetLink now takes a std::string_view
2021-10-16 08:20:04 -05:00
Charles Kerr
7b423b7e0d
refactor: tr_utf8clean now takes a std::string_view ( #1967 )
2021-10-15 20:02:40 -05:00
Charles Kerr
7e5e1f3812
refactor: tr_rpc_parse_list_str() takes a std::string_view ( #1966 )
2021-10-15 18:34:22 -05:00
Charles Kerr
3e7b8eb7bb
refactor: tr_parseNumberRange() takes a std::string_view ( #1962 )
...
* tr_parseNumberRange() now takes a std::string_view
2021-10-15 17:15:33 -05:00
Sander van Kasteel
d11ccf113c
Added primitive CORS header support ( #1885 )
...
* Copied over patch from github user fecristovao
* Added nullptr check
2021-10-15 15:10:09 -05:00
Charles Kerr
fb39c4663c
Fix/benc zero length dict key ( #1964 )
...
* fix: benc decoding bug that failed to parse hybrid torrents
2021-10-15 13:13:33 -05:00
Charles Kerr
23d85458f8
fix: cppcoreguidelines-init-variables pt. 3 ( #1954 )
...
* refactor: fix uninitialized variable warnings in variant code
* refactor: fix uninitialized variable warnings in web, webseed
2021-10-15 12:27:12 -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
c98b4d33c3
refactor: use C++'s [[noreturn]] atrribute ( #1960 )
2021-10-14 22:16:52 -05:00
Charles Kerr
f0171668c6
refactor: use C++ static_assert; remove TR_STATIC_ASERT ( #1959 )
2021-10-14 15:40:35 -05:00
Charles Kerr
fd5804fbb7
refactor: add readability-else-after-return to clang-tidy ( #1956 )
...
* refactor: add readability-else-after-return to clang-tidy
2021-10-14 14:26:38 -05:00
Oleg Chashko
b0f36a9841
Fix: issue #1940 ( #1955 )
...
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-10-14 13:18:18 -05:00
Johan
04f8b82308
Add total disk space to free-space RPC request ( #1682 )
...
* Add total space to free-space endpoint
* Update docs
2021-10-14 12:07:16 -05:00
Charles Kerr
ab82e155be
build: add clang tidy modernize loop convert ( #1949 )
...
* build: add clang-tidy check modernize-pass-by-value
* build: add clang-tidy check modernize-loop-convert
* refactor: constexpr
* refactor: make preallocGuess a std::array
2021-10-14 10:36:49 -05:00
Charles Kerr
5df6e4f88f
fix: uninitialized variables in announcer ( #1936 )
2021-10-14 09:22:28 -05:00
Rosen Penev
1f48884726
fix runtime with wolfSSL and fastmath ( #1950 )
...
wolfSSL's fastmath support requires options.h to be included before
anything else. Otherwise bad codepaths get taken and a crash occurs
during DH initialization.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-10-13 22:48:04 -05:00
Charles Kerr
af2af2a57e
build: add clang-tidy check modernize-pass-by-value ( #1946 )
2021-10-13 19:14:27 -05:00
Charles Kerr
65a3a7d042
build: have clang-tidy check for NULL in libtransmission ( #1945 )
2021-10-13 18:12:51 -05:00
Oleg Chashko
5947329a51
Fix: issue #1889 , #1894 , #1912 , #1913 ( #1923 )
...
* Fix: issue #1889
* Fix: issue #1894
* Fix: issue #1912
* Fix: issue #1913
2021-10-13 11:04:10 -05:00
Charles Kerr
306f0c4b80
fix: uninitialized variables pt 1: peer-mgr.cc ( #1932 )
...
* fix: uninitialized variables in peer-mgr.cc
2021-10-13 10:08:37 -05:00
Charles Kerr
98e16a178f
refactor: add an enumeration of the script types ( #1934 )
...
* refactor: add an enumeration of the script types
This simplifies the API by having a single set of functions that can be
used for getting/setting all the script types.
2021-10-12 22:46:12 -05:00
Charles Kerr
16dcc224ec
feat: add rpc-version-semver to RPC's session-get ( #1935 )
...
* feat: add rpc-version-semver to RPC's session-get
2021-10-12 22:03:28 -05:00
Charles Kerr
ba6513ed4a
feat: add an option to run a script when a torrent is added ( #1896 )
...
Co-authored-by: cfpp2p <cfpp2p>
2021-10-12 16:32:32 -05:00