* refactor: add StatsMode to libtransmission-app
* test: add display-mode unit tests
* feat: add apicompat for StatsMode
* refactor: use StatsMode in Qt client
* refactor: add template method for gtr_set_pref()
* refactor: use StatsMode in GTK client
* ci: use the all-tests alias instead of hardcoding tests
* ci: copy runtime DLLS into test output directory for Windows test binaries
* fix: warning: declaration shadows a variable in the global namespace [clang-diagnostic-shadow]
* fix: warning: use 'contains' to check for membership [readability-container-contains]
* fix: warning: variable gl_confdir can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage]
* warning: function 'TorrentFilter::match_mode' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
* refactor: use std::filesystem for tr_sys_path_is_same()
* refactor: use std::filesystem for tr_sys_path_exists()
* refactor: use std::filesystem for tr_sys_path_is_relative()
* refactor: use std::filesystem for tr_sys_path_get_info()
* refactor: use std::filesystem for tr_sys_dir_create()
* refactor: add `maybe_set_error()` helper
* refactor: change behavior to match previous impl
* fix: tr_sys_path_is_same() checks
refactor: address code review feedback
* refactor: address code review feedback
* chore: fix readability-else-after-return clang-tidy warning
* fix: warning: Value stored to 'created' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
fix: warning: parameter 'permissions' is unused [misc-unused-parameters]
* ci: work around a MSVC STL 14.44.35207 clang-tidy false warning
* refactor: simplify return logic of tr_sys_path_is_same()
* refactor: callers now own the return value of tr_torrentStat()
fix one potential thread issue by simplifying ownership
* refactor: make tr_stat_errtype an enum class; move into tr_stat
* refactor: order tr_stat fields to reduce padding
* chore: fix branch shear
* fix: int-to-enum-class comparison
* fix: namespace regression
* chore: make clang-tidy happy
* refactor: tr_torrentPeers() now returns a std::vector<tr_peer_stat>
* refactor: make tr_peer_stat.client a std::string_view
* refactor: make tr_peer_stat.flag_str a std::string
* refactor: make tr_peer_stat.addr a std::string
* refactor: rename tr_peer_stat field names to camel_case
* refactor: use Speed type for tr_peer_stat speed fields
* refactor: add default initializers to tr_peer_stat fields
* refactor: order tr_peer_stat fields to reduce padding
* fix: typo in [Torrent peers] getter
* refactor: make tr_peer_stat.user_agent a std::string
* refactor: pass by reference instead of by pointer in DetailsDialog
* fixup! refactor: add default initializers to tr_peer_stat fields
* refactor: tr_ctorGetDownloadDir() returns a std::optional<std::string>
* refactor: tr_sessionGetConfigDir() now returns a std::string
* refactor: tr_sessionGetDownloadDir() now returns a std::string
* refactor: tr_sessionGetIncompleteDir() now returns a std::string
* refactor: tr_sessionGetRPCWhitelist() now returns a std::string
* refactor: tr_sessionGetRPCPassword() now returns a std::string
* refactor: tr_sessionGetRPCUsername() now returns a std::string
* refactor: tr_sessionGetScript() now returns a std::string
* refactor: tr_blocklistGetURL() now returns a std::string
* refactor: tr_ctorGetSourceFile() now returns a std::optional<std::string>
* refactor: tr_torrentFile() now returns a std::string
* refactor: gtr_open_file() now takes a std::string_view
refactor: gtr_open_file() now calls Glib::filename_to_uri()
refactor: add gtr_open_file() variant that takes basedir and relative path
refactor: gtr_open_uri() now takes a relative_path std::string_view
* refactor: tr_torrentGetCurrentDir() now returns a std::string_view
refactor: tr_torrentGetDownloadDir() now returns a std::string_view
* refactor: add [Torrent updateTorrents]
refactor: use updateTorrents in Controller
* refactor: add a batch variant of tr_torrentStat()
* refactor: use batch variant of tr_torrentStat() in GTK details dialog
* refactor: use batch variant of tr_torrentStat() in gtr_confirm_remove()
* refactor: use batch variant of tr_torrentStat() in updateTorrents
* refactor: add Session::find_torrents()
* refactor: remove the raw ptr variant of updateTorrents()
* refactor: remove tr_sessionLock()
* fixup! refactor: add [Torrent updateTorrents]
remove duplicate method declaration
* fix: readability-avoid-const-params-in-decls
* fix: iwyu in transmission.h
* chore: remove an #include that was added in a draft that did not get used
* refactor: use nullptr instead of NULL
* chore: update copyright year in COPYING
* chore: update copyright year in user-facing files (1)
* chore: update copyright year in user-facing files (2)
* chore: update copyright year in cmake/transmission.rc.in
---------
Co-authored-by: github-actions <github-actions@github.com>
* refactor: add libtransmission-app
* refactor: add libtransmission-app/display-modes.h
* refactor: use app::SortMode, app:ShowMode in Qt client
* feat: add to_variant(), to_value() in serializer
* refactor: use app::SortMode in GTK client
* refactor: use app::ShowMode in GTK client
* refactor: make naming consistent with libtransmission-app
Move `FavIconCache` into a new `transmission::app` namespace.
I intend to add a couple more pieces into libtransmission to avoid
code duplication between the Qt and GTK apps.
We should consider making another module for these pieces if they start
to pile up; but for now, let's cordon them into their own namespace.
* refactor: remove unused appname arg from tr_sessionLoadSettings()
* refactor: swap order of arguments to tr_sessionLoadSettings()
so way the optional arg can go at the end
* refactor: add quarks for the RPC method names
* update tr_quark_convert() to handle RPC method names
* refactor: use interned keys for RPC method names
* test: add torrentGetLegacy test
* refactor: use interned keys for RPC method names in tr-qt
* refactor: use interned keys for RPC method names in tr-remote
* refactor: use interned keys for RPC method names in tests
* refactor: use interned keys for RPC method names in tr-gtk
* chore: fix readability-identifier-naming regression
* unbreak ChangeFlag bitwise operations (Fix#7572)
8 bits is not enough to do bitwise comparisons on more than 8 independent
values: use std:bitset to ensure proper bitwise operations inside
ChangeFlags().
* refactor: use bitset methods and specify TR_CONSTEXPR23
---------
Co-authored-by: Yat Ho <lagoho7@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: bump fmt to 11.2.0
Acquire 6797f0c39a, which fixes compile error on GCC 15.1.
Acquire
9f269062a7,
which fixes buffer overflow in NetBSD 10.1 on GCC 10.5.
Replace `fmt::localtime` with `std::localtime`, as `fmt::` is now
deprecated.
* fix: format timezone ourselves on Windows
{fmt} 11.2.0 removed the ability to format `std::tm` with the format specifier `%z` on Windows, for a good reason. Ref: https://github.com/fmtlib/fmt/issues/4444
This forces us to implement our own solution on Windows as there's no alternative.
* fix: support `FMT_USE_EXCEPTIONS`
* build: clang-tidy headers when building libtransmission
* chore: revert `= default` workaround
It was introduced in 6909ec0bad to fix build issues with macOS 10.14. We
no longer support that version.
* fix: clang-tidy warnings for libtransmission
* build: clang-tidy headers when building tests
* fix: clang-tidy warnings for tests
* build: clang-tidy headers when building qt
* code review: don't manually edit mime-types.h
* code review: unify variable naming for static private members
* fix: operator== should return bool in tr_strbuf
Fixes build error with C++20/C++23
error: return type 'auto' of selected 'operator==' function for rewritten '!=' comparison is not 'bool'
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* fix: explicitly specify Blocklist::size() return type as size_t
Fixes building with C++20/C++23
error: no matching function for call to 'size'
function 'size' with deduced return type cannot be used before it is defined
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* fix: wrap runtime format strings with fmt::runtime in library, daemon and cli
fmt::format_string ctor is consteval with C++20
See https://github.com/fmtlib/fmt/issues/2438
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* fix: wrap runtime format strings with fmt::runtime for GTK client
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* fix: allow to override C and CXX standard via cmdline or env
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* fix: add job to check if transmission compiles with C++23
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* Address code review by mikedld
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* fix new found fmt build errors
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* Address code review by tearfur
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* fix: make tr_net_init_mgr singleton buildable with C++23
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
---------
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>