Commit Graph

85 Commits

Author SHA1 Message Date
Nick fb79a2d399
qt: add dynamic RPC keys (#6599)
* add dynamic main stat keys

* make dynamic rpc calls more generic
2024-04-01 09:02:17 -05:00
Charles Kerr a90d0fce2b
refactor: inline simple getters in qt client (#6621)
* refactor: make RpcClient::url() constexpr

* refactor: make Session::getRemoteUrl() constexpr

* refactor: make RpcQueue::setTolerateErrors() constexpr

* refactor: make RpcClient::isLocal() constexpr

* refactor: make Session::isLocal() constexpr

* refactor: make Session::isServer() constexpr

* refactor: make PathButton::label() constexpr

* chore: remove accidentally-committed makelog file
2024-02-18 18:48:27 -06:00
Charles Kerr 7c11809672
fix: more clang-tidy warnings (#6608)
* fix: readability-redundant-casting warnings in gtk

* fix: bugprone-move-forwarding-reference warnings in gtk

* fix: readability-redundant-casting warnings in qt

* fix: bugprone-switch-missing-default-case warnings in qt

* fix: readability-use-std-min-max warning in qt client

* fix: readability-static-accessed-through-instance warning in qt client

* fix: cppcoreguidelines-avoid-const-or-ref-data-members warning in qt client

* fix: readability-avoid-nested-conditional-operator warning in qt client

* fixup! fix: readability-use-std-min-max warning in qt client

* fix: readability-redundant-member-init warnings in gtk client

* fix: performance-avoid-endl warnings in gtk client

* chore: disable readability-qualified-auto

too many false warnings

* chore: disable cppcoreguidelines-avoid-const-or-ref-data-members

* chore: fix readability-duplicate-include warning in gtk client

* chore: fix modernize-use-nodiscard warning in gtk client

* chore: fix readability-convert-member-functions-to-static warning in gtk client

* fixup! fix: bugprone-move-forwarding-reference warnings in gtk

* chore: fix performance-enum-size warning in gtk client

* fix: cppcoreguidelines-prefer-member-initializer warning in gtk client

* fix: readability-identifier-naming warning in qt client

* Revert "chore: fix performance-enum-size warning in gtk client"

This reverts commit 5ce6b562f8.

* fix: readability-redundant-member-init warning in move tests

* fix: readability-redundant-casting warnings in tests

* fixup! fix: readability-identifier-naming warning in qt client

* fixup! fix: readability-avoid-nested-conditional-operator warning in qt client

* fix: readability-static-accessed-through-instance warning in qt client

* fix: readability-redundant-casting warning in watchdir tests
2024-02-17 13:31:49 -06:00
Yat Ho 32ef92e7a7
feat: do separate IPv4 and IPv6 port checks in Qt and GTK Client (#6525)
* fix: specify `port-test` ip protocol in response when possible

* feat: IPv4 and IPv6 port test in Qt Client

* feat: shorten timeout of `port-test`

* feat: IPv4 and IPv6 port test in Gtk Client

* chore: housekeeping

* refactor: remove IP protocol error message

* code review: mikedld gtk

* feat: return tag in qt rpc response

* code review: mikedld qt

* feat: move port test button up alongside spin button

* fixup! code review: mikedld gtk

* fixup! code review: mikedld qt

* code review: port status initial text

* feat: decouple ipv4 and ipv6 status updates (GTK)

* feat: decouple ipv4 and ipv6 status updates (Qt)

* code review: unknown protocols are non-pending

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* code review: simplify status text when the statuses are the same

* Revert "feat: return tag in qt rpc response"

This reverts commit 2a022c2bb0ee7ddad81f8176839cf0d043422368.

* code review: add translation context for status text (GTK)

* code review: move `port_test_pending_` to `Impl` (GTK)

* fixup! code review: move `port_test_pending_` to `Impl` (GTK)

---------

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2024-01-21 16:50:26 -06:00
Charles Kerr 9d433ff8b4
fix: misc-include-cleaner clang-tidy warnings (#6502) 2024-01-07 14:21:05 -06:00
Yat Ho 4bb9eab0d0
fix: app defaults should override libtransmission defaults (#6495) 2024-01-06 10:10:14 -06:00
Nick e80ec7b7a4
feat: add labels to DetailsDialog of Qt client 2023-12-25 16:09:20 -06:00
Charles Kerr 64d9d57363
chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
Charles Kerr 2c9768bc12
fix: only append '.added' suffix to watchdir files (#5705) 2023-11-04 13:14:08 -05:00
Julien 8ac323d5d6
chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
Charles Kerr 237223aeaf
refactor: prefer std::set over QSet (#5703)
* refactor: use std::set instead of QSet in WatchDir.cc

* refactor: use std::set instead of QSet in FileTreeView.cc

* refactor: use std::set instead of QSet in ColumnResizer.cc

* refactor: use std::set instead of QSet in Prefs.cc

* chore: fix rebase error that changed libsmall snapshot

* refactor: more replace QSet with std::set
2023-10-24 21:14:37 -04:00
Charles Kerr 6ead147620
refactor: use new tr_variant API in tr_session (#6006) 2023-09-16 08:23:35 -05:00
Charles Kerr ebb1b775af
refactor: public tr_session settings API now returns tr_variants (#5983) 2023-09-07 19:05:16 -05:00
Charles Kerr 5837603b6f
refactor: make tr_variant follow RAII (#5923) 2023-08-20 23:15:23 -05:00
Charles Kerr d7473f22ed
refactor: prefer direct-brace-initialization (#5803) 2023-07-18 10:20:17 -05:00
Charles Kerr cb6358048d
fix: does not trash added torrent files when asked (#5505) 2023-05-08 16:21:54 -05:00
Charles Kerr 0d3b321bac
refactor: use snake_case for libtransmission class methods (#5497) 2023-05-05 23:11:05 -05:00
Julien 4b8cfa2e57
chore: update copyrights to 2023 (#4834) 2023-02-11 14:49:42 -06:00
Dmitry Antipov 7eecd87034
fix: Qt 6 deprecation warnings (#4710) 2023-02-10 11:58:43 -06:00
anarcat 331e1699bc
add remote HTTPS support to Qt GUI (#4622) 2023-01-26 00:24:04 -06:00
Charles Kerr 22c14c9266
fix: sonarcloud warnings (#4180) 2022-11-15 10:25:12 -06:00
Charles Kerr dd12fd010a
chore: iwyu headers (#3833) 2022-09-21 18:34:18 -05:00
Charles Kerr 9280bf3475
chore: re-enable qt clang tidy warnings (#3791) 2022-09-08 18:26:18 -05:00
Charles Kerr c000311b80
fix: qt open magnet dialog munges magnet url (#3787) 2022-09-07 16:38:34 -05:00
Charles Kerr 072bb0322c
refactor: remove tr_quark_get_string() (#3728) 2022-08-28 16:17:07 -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 31a733fab7
refactor: make tr_session_id a class (#3598) 2022-08-06 14:27:37 -05:00
Charles Kerr 3ed6b187bb
refactor: iwyu utils.h (#3583) 2022-08-04 08:44:18 -05:00
Charles Kerr f39826cc59
fix: clang-tidy-15 warnings (#3570)
* fix: bugprone-assignment-in-if-condition warning in tr_bitfield::countFlags()

* fix: bugprone-assignment-in-if-condition warning in tr_watchdir_generic_new()

* fix: bugprone-assignment-in-if-condition warning in torrentRenamePath()

* fix: bugprone-assignment-in-if-condition warning in tr_watchdir_inotify_on_event()

* fix: bugprone-assignment-in-if-condition warning in tr_variantWalk()

* fix: misc-const-correctness warning in TrackerDelegate::getText()

* fix: bugprone-assignment-in-if-condition warning in Session::updateStats()

* fix: performance-unnecessary-value-param warning in discoverThreadfunc()

* fix: clang-analyzer-core.UndefinedBinaryOperatorResult warning in tr_completion::setHasAll()

* fix: clang-analyzer-core.UndefinedBinaryOperatorResult warning in tr_torrentFileCompleted()

* fix: silence clang-analyzer-cplusplus.NewDelete warning when using QPointer

This appears to be a false positive; added NOLINT
2022-08-02 18:34:53 -05:00
Charles Kerr 32f854a7cf
refactor: add a tr_port safety class (#2952) 2022-04-21 10:58:13 -05:00
Charles Kerr 46cc95f72e
refactor: remove unused functions (#2863)
* refactor: annotate nodiscard, constexpr, noexcept methods

* refactor: remove unused tr_blocklistFileExists()

* refactor: remove unused tr_blocklistFileIsEnabled()

* refactor: remove unused tr_ctorGetContents

* refactor: remove unused tr_error_is_set()

* refactor: remove unused tr_handshakeGetAddr()

* refactor: remove unused tr_ctorSetLabels()

* refactor: remove unused tr_http_escape_sha1()

* refactor: remove unused tr_lpdEnabled()

* refactor: remove unused tr_ptrArrayPop()

* refactor: remove unused tr_torrentClearIdleLimitHitCallback()

* refactor: remove unused tr_torrentFindFromHash()

* refactor: remove unused tr_sha1_to_string()

* refactor: remove unused tr_torrents::get()

* refactor: remove unused tr_isEncryptionMode()

* refactor: remove unused tr_isPreallocationMode()

* refactor: remove unused tr_ptrArrayBack()

* refactor: remove unused tr_ptrArrayClear()

* refactor: remove unused tr_torrents::get()

* refactor: remove unused Session::torrentSet()

* refactor: remove unused peer_atom comparison operators

* refactor: remove unused peer_atom::compare()

* refactor: remove unused Qt variantInit(tr_variant*, unsigned)
2022-04-01 21:55:30 -05:00
Stefan Talpalaru 7b377511a9 feat: default public trackers 2022-02-21 08:34:57 -06:00
Charles Kerr 02b6cc76d1
feat: add tr_torrentSetTrackerList(), tr_torrentGetTrackerList() (#2642)
Add a getter/setter for torrent announce URLs as text that can be copied
and pasted: one URL per line, with a blank line between tiers.

C API: tr_torrentGetTrackerList() and tr_torrentSetTrackerList()
RPC APi: `trackerList` in `torrent-get` and `torrent-set`.

This deprecates `trackerAdd`, `trackerRemove`, and `trackerEdit`
from the RPC API.
2022-02-18 11:52:01 -06:00
Charles Kerr 9f9b6cdaa2
feat: run script when done seeding (#2621)
* feat: add seeding-done script to core and rpc

* feat: add seeding-done script to gtk client

* feat: add seeding-done script to qt client

* feat: add seeding-done script to transmission-remote

* refactor: make Qt and GTK client text match

* test: update tests

Co-authored-by: Timothy Nibeaudeau <timothy.nibeaudeau@gmail.com>
2022-02-13 22:07:12 -06:00
Charles Kerr 8afbfecadb
refactor: re-enable some clang-tidy checks in qt/ (#2585)
* chore: re-enable readability-static-accessed-through-instance test in qt

* chore: re-enable clang-diagnostic-nonportable-system-include-path check in qt/

* chore: re-enable clang-diagnostic-undefined-reinterpret-cast test in qt/

* chore: re-enable cert-err58-cpp check in qt/

* chore: re-enable clang-diagnostic-switch-enum check in qt/

* chore: re-enable modernize-return-braced-init-list check in qt/

* chore: re-enable cppcoreguidelines-pro-type-static-cast-downcast check in qt/

* chore: re-enable cppcoreguidelines-pro-type-cstyle-cast check in qt/

* refactor: re-enable cppcoreguidelines-init-variables check in qt/

* chore: re-enable cppcoreguidelines-pro-type-vararg check in qt/

* chore: remove explicit disable of clang-diagnostic-old-style-cast check in qt/

* chore: re-enable bugprone-implicit-widening-of-multiplication-result check in qt/
2022-02-07 21:56:04 -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 4455673bed
fix: some use-init-statement sonarcloud warnings (#2566) 2022-02-03 07:02:11 -06:00
Charles Kerr 878405f862
Revert "fix: sonarcloud (#2558)" (#2562)
This reverts commit 8b9483f7fb.
2022-02-01 11:30:51 -06:00
Charles Kerr 8b9483f7fb
fix: sonarcloud (#2558)
* fix: add const modifier for functions

* fix: many sonarcloud use-init-statement warnings
2022-01-31 22:46:27 -06:00
Charles Kerr 26bb9f3440
fix: sonarcloud code smells (#2486) 2022-01-23 18:53:35 -06:00
Charles Kerr df1cca9b57
chore: update copyright years, make notices consistent (#2463) 2022-01-20 12:27:56 -06:00
Charles Kerr 1413346fa2
fix: details dialog "available" percent can be off (#2025)
It's often off by a little bit because it fails to account for blocks
we've downloaded but haven't been verified yet. Copied the fix from the
GTK client.
2021-10-23 23:45:10 -05:00
Charles Kerr f876a100a0
refactor: add [[fallthrough]] annotation (#1886) 2021-10-06 12:24:02 -05:00
Mike Gelfand db3d40d0ed Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
Charles Kerr 9d313a8816
sonarcloud warnings 9 (#1511)
* refactor: const correctness 

* refactor: fix some implicit conversions

* refactor: make local pointers const if their objects are not modified

* refactor: do not cast away const in torrent-cell-renderer

* refactor: remove call to deprecated gtk_icon_size_lookup_for_settings

* refactor: member functions that do not mutate their objects should be declared const

* chore: do not end comments with a semicolon
2020-11-08 21:31:02 -06:00
Charles Kerr 0bfbc3eba7
Sonarcloud warnings 4 (#1499)
* chore: fix some sonarcloud html warnings (e.g. deprecated attribute use)

* chore: uppercase literal suffixes

* chore: remove redundant casts

* chore: remove commented-out code

* chore: use qInfo() instead of std::cerr
2020-11-02 09:16:12 -06:00
Charles Kerr 73fdd722a7
Sonarcloud warnings 3 (#1498)
* chore: use ClassName:: for calling static methods

* chore: prefer to initialize member data in the class initializer
2020-11-01 19:13:32 -06:00
Charles Kerr 973e63d897
refactor: use qt5's connect api (#1491)
* refactor: use qt5's connect syntax everywhere

https://wiki.qt.io/New_Signal_Slot_Syntax
2020-10-31 13:56:12 -05:00
Charles Kerr f59118d1fe
feat: add torrent-get 'primary-mime-type' to RPC. (#1464)
* feat: add torrent-get 'primary-mime-type' to RPC.

This is a cheap way for RPC clients to know what type of content is in a
torrent. This info can be used to display the torrent, e.g. by using an
icon that corresponds to the mime type.

* use size_t for content byte count

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* explicit boolean expressions

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* use uint64_t for content byte counts

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* avoid unnecessary logic branches

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* explicit cast

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* refactor: add an autogenerated mime-type.h header

* chore: maybe fix the win32 FTBFS

* chore: add mime-types.[ch] to xcode

* Squashed commit of the following:

commit 4c7153fa48
Author: Mike Gelfand <mikedld@users.noreply.github.com>
Date:   Tue Oct 13 03:15:19 2020 +0300

    Remove autotools-based build system (#1465)

    * Support .git files (e.g. for worktrees, submodules)
    * Fix symlinks in source tarball, switch to TXZ, adjust non-release name
    * Remove autotools stuff

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2020-10-13 10:33:56 -05:00