1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 08:43:27 +00:00
Commit graph

266 commits

Author SHA1 Message Date
Charles Kerr
32a62d85ea
refactor: more tr_variant API (#6057) 2023-10-02 16:18:35 -05:00
Charles Kerr
fbfbfac3ae
fix: minor coverity warnings (#5916)
* fix: unchecked return value from tr_variantDictFindInt()

coverity 1541113

* fix: unchecked return value from tr_variantDictFindBool()

coverity 1541112

* fix: copy-instead-of-move in tr_strlower()

coverity 1541092

* fix: use auto& instead of auto in test

coverity 1541084

* fix: logically dead code

coverity 1541065

* fix: copy-instead-of-move in tr_announcer_impl::addTorrent()

coverity 1541062

* fix: unchecked return value of tr_variantDictFindInt()

coverity 1541061

* fix: copy-instead-of-move in FilterBar::Impl::tracker_filter_model_update()

coverity 1541058

* fix: copy-instead-of-move in gtr_window_on_close()

* fix: silence invalid resource leak warning

coverity 1520595

* fix: unchecked return value from setsockopt()

coverity 1518345

* fix: dereference after null check (FORWARD_NULL)

coverity 1517816
2023-08-21 21:59:47 -05:00
Charles Kerr
59c638c63d
refactor: replace tr_variant::is_*() with tr_variant::holds_alternative() (#5930) 2023-08-21 16:16:54 -05:00
Charles Kerr
5837603b6f
refactor: make tr_variant follow RAII (#5923) 2023-08-20 23:15:23 -05:00
Charles Kerr
a4d205612a
refactor: add tr_variant_serde (#5903) 2023-08-17 11:02:45 -05:00
tearfur
5ec4ca550e
chore: iwyu (#5746) 2023-07-08 10:24:03 -05:00
lvd2
8b96e2616a
transmission-remote: for '-l', implement default sorting by addedDate (#5608) 2023-07-07 14:56:49 -05:00
tearfur
2211086338
fix: conform to libcurl requirements to avoid memory leak (#5702) 2023-07-05 22:05:03 -05:00
Charles Kerr
8183d7fddf
refactor: utils naming (#5696)
* chore: rename tr_strvContains to tr_strv_contains

* chore: rename tr_strvStartsWith to tr_strv_starts_with

* chore: rename tr_strvEndsWith to tr_strv_ends_with

* chore: rename tr_strvSep to tr_strv_sep

* chore: rename tr_strvStrip to tr_strv_strip

* chore: rename tr_strvToBuf to tr_strv_to_buf

* refactor: rename tr_saveFile() to tr_file_save()

rename tr_loadFile() to tr_file_read()

rename tr_moveFile() to tr_file_move()

* refactor: rename tr_parseNum() to tr_num_parse()

refactor: rename tr_parseNumRange() to tr_num_parse_range()

* chore: group related functions together in header
2023-06-30 09:49:58 -05:00
Charles Kerr
ce66e5c442
iwyu: remove, add std headers where used (#5694)
* chore: remove unused #include <array>

* chore: remove unused #include <chrono>

* chore: remove unused #include <set>

* chore: remove unused #include <algorithm>

* chore: remove unused #include "interned-string.h"

* chore: remove unused #include <list>

* chore: remove unused #include <optional>

* chore: iwyu <cstddef>

* chore: iwyu <ctime>

* chore: remove unused #include <cerrno>

* chore: remove unused #include <deque>

* chore: remove unused #include <vector>

* chore: remove unused #include <memory>

* chore: remove unused #include <unordered_set>

* chore: remove unused #include <array>

* chore: remove unused #include <mutex>

* chore: remove unused #include <functional>

* chore: remove unused #include <cmath>
2023-06-29 23:51:55 -05:00
lvd2
d0b0810457
fix: add 'years' and 'Infinity' to ETA in transmission-remote (#5584) 2023-06-20 12:29:57 -05:00
Robin Seth Ekman
c379cd727f
fix: transmission-remote only list every other label (fixes #5571) (#5572) 2023-06-11 20:19:54 -05:00
Charles Kerr
60c68afdde Revert "fix: some labels not displayed in transmission-remote (#5600)"
This reverts commit ebd5080a93.
2023-06-11 11:25:35 -05:00
Charles Kerr
ebd5080a93
fix: some labels not displayed in transmission-remote (#5600)
Fixes #5571.
2023-06-10 19:01:32 -05:00
Charles Kerr
0d3b321bac
refactor: use snake_case for libtransmission class methods (#5497) 2023-05-05 23:11:05 -05:00
Mike Gelfand
e8fcb025a0
fix: use user-preferred locale (#5444)
* Use user-preferred locale

Previous fix adding `L` format specifier was correct but only fixed half
of the problem, as C++ locale is set up to be "C" by default. GTK client
used to call `setlocale(LC_ALL, "")` to set up user-preferred locale
which only affected C functions and `std::locale` (used by libfmt) was
unaware of those changes.

Apply the fix to all the binaries since they're all doing some sort of
output to the user and calling libtransmission helpers, as well as using
libfmt directly.

* Improve libtransmission's json-test

Set the locale C++ way to avoid any sort of inconsistencies, and also
restore it to the old one once finished testing.

* Improve transmission-show test runner script

Quote outputs to avoid CMake error about `message()` being called with
no arguments. Capture stderr to the same output file. Fallback to `git
diff` if `diff` wasn't found. A few other minor changes.
2023-04-27 09:10:33 -05:00
Charles Kerr
9d2507c7e3
refactor: snake_case in libtransmission class methods (#5428) 2023-04-22 20:25:55 -05:00
Charles Kerr
7d86d67bc7
chore: prefer fmt/core.h over fmt/format.h (#5404) 2023-04-16 15:34:19 -05:00
Pierre Dubouilh
ebfba686b0
feat: sequential download (#4795) 2023-04-14 11:47:54 -05:00
hoimic
652c4666dc
fix: 'downloaded' field (#5265) 2023-03-20 16:42:32 -05:00
Charles Kerr
3aeefec203
chore: remove unused header includes (#5227) 2023-03-14 18:36:15 -05:00
Charles Kerr
5ada8c46d4
fix: transmission-remote warning when adding magnet link (#5088) 2023-02-27 15:58:38 -06:00
Julien
4b8cfa2e57
chore: update copyrights to 2023 (#4834) 2023-02-11 14:49:42 -06:00
Charles Kerr
977a190646
fix: msvc warnings (#4651)
* fix: C4189 local variable is initialized but not referenced

* fix: C4706 assignment within conditional expression

* fix: C4018 signed/unsigned mismatch

* fix: warning C4996 High-DPI scaling is always enabled.

* fix: C4996: QApplication::fontMetrics() is deprecated

eed5514eaf
2023-01-23 19:24:52 -06:00
Luukas Pörtfors
980cc6f922
fix(remote): Crash caused by typo when displaying tracker info (#4633) 2023-01-22 08:50:46 -06:00
Luukas Pörtfors
7eef715105
fix(remote): Don't draw "Yes" or "No" as an integer (#4624) 2023-01-21 12:42:53 -06:00
Mike Gelfand
57e6b06921
Modernize CMake code (ongoing refactoring) (#4515)
* Use imported CMake target for CURL

* Use imported CMake target for fmtlib

* Use imported CMake target for WideInteger

* Use imported CMake target for FastFloat

* Use imported CMake target for UtfCpp

* Use imported CMake target for Threads

* Use imported CMake target for Iconv

* Use imported CMake target for crypto backend

* Use imported CMake target for GTK

* Use imported CMake target for Qt

* Use imported CMake target for deflate

* Use imported CMake target for libevent

* Use imported CMake target for natpmp

* Use imported CMake target for miniupnpc

* Use imported CMake target for dht

* Use imported CMake target for psl

* Use imported CMake target for libutp

* Use imported CMake target for libb64

* Use include directories from libtransmission target
2023-01-02 16:23:51 +00:00
Mike Gelfand
bc380511db
Modernize CMake code (ongoing refactoring) (#4507)
* Reformat CMake code

* Bump minimum CMake version to 3.12

* Add target sources separately via `target_source()`

* Make `tr_win32_app_info()` add target sources on its own

* Don't use `include_directories()`

* Don't use `add_definitions()`

* Limit use of `add_compile_options()`

* Move VDKQueue target declaration to a subdirectory

* Add `tr_disable_source_files_compile()` helper

* Add `tr_target_glib_resources()` helper

* Add `tr_gettext_msgfmt()` helper

* Enable AUTOUIC for Qt client

* Enable AUTORCC for Qt client

* Remove AUTO{MOC,RCC,UIC} source group overrides

* Add `tr_target_idl_files()` helper

* Move source group setup to `tr_qt_add_translation()`

* Add `tr_target_xib_files()` helper

* Prefer `target_sources()` to intermediate variables

* Use explicit visibility versions of `target_*()` commands

* Prefer genexes to conditions in `target_*()` commands

* Add `tr_allow_compile_if()` helper

* Leave only top-level `project()`, remove the rest

* Minor fixups

* Fixup Mac QL plugin install

* Fixup IDE target folders and source groups
2023-01-01 19:49:48 +00:00
Luukas Pörtfors
a46bcf7381
fix(remote): Fix tr_strltime to output days correctly (#4506) 2023-01-01 13:01:48 -06:00
Mike Gelfand
5fd0aff818
Automatically (re)order include directives (GTK client) (#4475)
* Automatically (re)order include directives (GTK client)

Include our headers first to ease IWYU enforcement.

* Fix includes missing from headers (GTK client)

* Fix build on Mac after includes reordering
2022-12-26 21:13:21 +00:00
Charles Kerr
a1892f2c7c
fix: 4.0.0-beta.2 regression transmission-show --scrape did not exit cleanly (#4447) 2022-12-23 08:03:26 -06:00
Mike Gelfand
e694c3e3a0
Use C++ (not C) warning flags for GTK client (#4395)
Use the opportunity to reduce duplication.
2022-12-18 01:02:03 +00:00
Charles Kerr
a0b5623769
refactor: use tr_web instead of curl in transmission-show (#4281) 2022-11-29 21:53:28 -06:00
Charles Kerr
59335eac03
fix: sonarcloud cpp:S6004 (#4270)
reduce scope of variables by using if-based initializer
2022-11-28 21:03:28 -06:00
Charles Kerr
d8327949ac
refactor: do not reimplement tr_getRatio() in transmission-remote (#4257) 2022-11-27 16:58:58 -06:00
Charles Kerr
22c14c9266
fix: sonarcloud warnings (#4180) 2022-11-15 10:25:12 -06:00
A Cœur
12e564096b
fix: "Implicit conversion loses integer precision" warnings (#3960) 2022-10-25 11:14:42 -05:00
Yaron Shahrabani
e97a98f10b
Swapped plural and singular positions (#3996) 2022-10-19 13:05:36 -05:00
Luukas Pörtfors
9313e42866
remote: improve and document the rename command (#3973) 2022-10-19 00:02:23 +01:00
Charles Kerr
4ed61a0a75
fixup! refactor: remove TR_PRIsv macros (#3842) (#3992)
fix: invalid format string passed to fmt::print
2022-10-18 14:57:11 -05: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
Luukas Pörtfors
f8fdc6a828
remote: fix invalid format string (#3909) 2022-10-08 22:10:47 +03:00
Charles Kerr
fed6d180fe
fixup: new coverity warnings (#3864)
* fixup: memcmp length argument regression

* perf: fix big parameter passed by value

* chore: silence unchecked curl_easy_setopt return value warning
2022-10-02 19:45:38 -05:00
Charles Kerr
31ce989334
fix: unnamed placeholders in create.cc (#3848) 2022-09-28 10:22:58 -05:00
Charles Kerr
d82090658f
refactor: remove TR_PRIsv macros (#3842)
* refactor: remove TR_PRIsv from transmission-show

* refactor: remove TR_PRIsv from transmission-edit

* refactor: remove TR_PRIsv from transmission-remote

* refactor: remove TR_PRIsv from log.cc

* refactor: remove TR_PRIsv macro

* chore: remove FMT_STRING macro in transmission-edit

* refactor: use __android_log_write()
2022-09-23 14:36:37 -05:00
LaserEyess
fe9aba702e
utils/remote: add option to dump RPC response as JSON (#3819)
Co-authored-by: LaserEyess <LaserEyess@users.noreply.github.com>
2022-09-14 17:20:40 -07:00
orbital-mango
339b9580cf
transmission-edit: Allow changes to torrent source flag (#3760) 2022-09-04 18:12:23 -05:00
Charles Kerr
bbb1ba6ea3
refactor: tr_urlPercentEncode() (#3688) 2022-08-21 08:43:09 -05:00
Charles Kerr
aac1ab784d
refactor: replace tr_http_escape() with tr_urlEscape() (#3678) 2022-08-19 14:33:06 -05:00
Charles Kerr
1cf19550ad Revert "refactor: use OutputIterator for url-escaped info hash strings (#3672)"
This reverts commit 479a16787e.
2022-08-19 02:18:16 -05:00