Commit Graph

1041 Commits

Author SHA1 Message Date
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
Gary Elshaw 26416f340f
fix: improve resolution of Qt app icon (#5570) 2023-06-26 10:07:43 -05:00
Charles Kerr 4b9b9920bf
refactor: prefer std::map over QMap in transmission-qt (#5641)
* refactor: use std::map instead of QMap in PrefsDialog.cc

* refactor: use std::map instead of QMap in DetailsDialog.cc

* refactor: use std::map instead of QMap in OptionsDialog.cc

* refactor: use std::map instead of QMap in FileTreeModel.cc
2023-06-19 16:51:34 -05:00
Dmitry Antipov 040bc8a1ce
fix: Qt 6.5 deprecation warning (#5552) 2023-06-19 16:22:54 -05:00
Charles Kerr 0ef58c2a20
chore: improve lossless compression of png files (#5586) 2023-06-05 17:03:11 -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
Charles Kerr bd8b50ef7b
fix: show magnet name in compact mode (#5491) 2023-05-04 15:24:19 -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 1b6b85989c
feat: add generic favicon_cache class for reuse between Qt, GTK app (#5294) 2023-04-22 21:11:16 -05:00
Charles Kerr 9d2507c7e3
refactor: snake_case in libtransmission class methods (#5428) 2023-04-22 20:25:55 -05:00
Charles Kerr a8e01ac38d
fix: minor warnings (#5409)
* chore: fix readability-qualified-auto warnings

* chore: fix clang-analyzer-core.uninitialized.Branch warning

* fix: collision of key 'ERROR' in transmission-qt

* chore: silence -Wshadow warning

* chore: silence warning C4100: 'iter': unreferenced formal parameter

* chore: fix warning C4127: conditional expression is constant warning
2023-04-17 23:11:09 -05:00
Charles Kerr 7d86d67bc7
chore: prefer fmt/core.h over fmt/format.h (#5404) 2023-04-16 15:34:19 -05:00
Miha Korenjak 819e5bdca3
feat: add more complex formatting to a spinbox (#5124) 2023-04-14 13:38:56 -05:00
Pierre Dubouilh ebfba686b0
feat: sequential download (#4795) 2023-04-14 11:47:54 -05:00
Mike Gelfand 4c8037afee
Sync translations (#5391) 2023-04-14 03:00:44 +01:00
Charles Kerr 25f38d5ff3
fix: wrong tier value in torrent get tracker stat response (#5274) 2023-03-21 20:23:08 -05:00
Charles Kerr f5a24862db
fix: FTBFS in Ubuntu 20.04 / Qt 5.13 (#5238) 2023-03-16 18:59:31 -05:00
Charles Kerr be77226d6b
fix: update Torrent::ratio() to match #2770 (#5193) 2023-03-10 14:32:12 -06:00
Mike Gelfand 8cdb6ec798
chore: sync translations (#5182) 2023-03-08 23:29:22 -06:00
Charles Kerr 8fc904617b
fix: correctly handle batch-adding trackers to multiple torrents (#5122) 2023-03-02 00:33:49 -06:00
Charles Kerr d21a3b622a
fix: 4981 open folder should open selected folder (#5115) 2023-03-01 15:57:23 -06:00
Charles Kerr 6a185634b0
fix: open-folder does not work in qt client (#4963) 2023-02-20 14:41:47 -06:00
Charles Kerr 2b3578512c
fix: display correct tracker port in qt torrent-details (#4846) 2023-02-11 21:46:57 -06: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
Mike Gelfand 6a6ce4c7c0
Sync translations (#4729)
* Sync translations with code

* Sync translations with Transifex
2023-02-07 20:42:19 +00:00
Charles Kerr b641906b13
fix: make torrent speed limit order consistent in prefs, details dialogs (#4677)
Fixes #988.
2023-01-26 22:11:35 -06:00
Nick b5339273d0
quick fix: changed order of some session prefs (#4676) 2023-01-26 14:38:39 -06:00
anarcat 331e1699bc
add remote HTTPS support to Qt GUI (#4622) 2023-01-26 00:24:04 -06:00
Gary Elshaw c7b9eaff12
Remove 'Message Log' item from sys tray (#4656)
Fixes: #3773
2023-01-24 18:52:52 -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
Mike Gelfand 240414f776
Sync translations (#4535)
* Sync translations with code

* Fix translations with Transifex
2023-01-04 16:32:21 -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
Mike Gelfand 3510439c78
Fix progress bars positioning in Qt client on Mac (#4489)
This is a workaround for QTBUG-67830, where progress bars seem to be drawn
regardless of style option's rect top-left coordinates.
2022-12-28 14:46:23 +00:00
Charles Kerr 1402cb2949
refactor: add TR_CONSTEXPR20 to make future C++20 migration easier (#4457) 2022-12-23 15:21:40 -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 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 4adda4dc1e
fix: sonarcloud cpp:S6005 (#4268) 2022-11-28 18:26:03 -06:00
Charles Kerr e0a44a1e5d
refactor: remove references to FD_SETSIZE (#4263) 2022-11-28 14:36:39 -06:00
Charles Kerr 49393daf01
refactor: use std::optional.value_or() (#4255) 2022-11-27 14:56:34 -06:00
Mike Gelfand d381939267
Sync translations (#4247)
* Sync translations with code

* Sync translations with Transifex
2022-11-26 16:32:26 +00:00
Charles Kerr 554ba06ae2
fix: coverity warnings, sonarcloud code smells (#4232) 2022-11-24 10:17:02 -06:00
Charles Kerr 29090d6590
fixup! refactor: remove unused vars, code simplify and minor optimize (#4172) (#4230)
set the converter state in isValidUtf8()
2022-11-24 01:12:01 -06:00
Herman Semenov ffd5e6bf50
refactor: remove unused vars, code simplify and minor optimize (#4172) 2022-11-19 09:46:03 -06:00
Charles Kerr 22c14c9266
fix: sonarcloud warnings (#4180) 2022-11-15 10:25:12 -06:00
Mike Gelfand c9debcfd48
Sync translations (#4161)
* Sync translations with code

* Sync translations with Transifex
2022-11-14 09:48:42 +00:00
Mike Gelfand 43acd7e3e4
Remove Xcode project in favor of CMake (#4147)
* Compile images into an assets catalog

* Optionally sign resulting Mac bundle

* Move 3rd-party/utility/test targets to their own folders

* Enable ARC via compile options unconditionally

* Install base and localized resources into correct directory

This seems like a Xcode quirk: if subdirectory containing the resource file
matches the destination directory name (and probably if there's more than one
resource file being installed there), the resulting folder structure then
contains an extra subdirectory, i.e. Resources/dirname/dirname/resname.

* Group source files for better structure in IDEs (Xcode, VS)

* Remove Xcode project

Using Xcode is still possible via "Xcode" CMake generator.

* Use ad-hoc signature if one is not specified

* Always use ad-hoc signature on link, leave proper signing to CPack

* Install localized resources into correct directory (QL plugin)

* Don't include CTest (we don't use additional targets it provides)

* Revert "Remove Xcode project"

This reverts commit dc069f654f.
2022-11-12 20:01:57 +00:00
Charles Kerr 250e055c1d
fix: warnings from clang tidy sonarcloud coverity (#4143) 2022-11-12 09:53:09 -06:00
Charles Kerr 450f1dcadc
refactor: extract `tr_buffer` class from `tr_peerIo` (#3986) 2022-10-19 11:42:08 -05:00
Mike Gelfand 9dd4454729
Sync translations (#3968)
* Sync translations with code

* Migrate to Go-based Transifex client version

* Sync translations with Transifex
2022-10-15 21:21:13 +03: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
Mike Gelfand b0de4b7a89
Add build job based on Fedora 37 (#3921)
This allows to test against GTK 4 and Qt 6.

Changes to CMakeLists.txt files are non-functional and are meant to
trigger the components rebuild, nothing more.
2022-10-09 12:13:02 +03:00
Mike Gelfand 1b641b660e
Sync translations (#3845)
* Sync translations with code

* Sync translations with Transifex
2022-09-24 17:19:25 +01:00
Charles Kerr dd12fd010a
chore: iwyu headers (#3833) 2022-09-21 18:34:18 -05:00
OscarCunningham b2b82a952c
Qt: Correct 'Sort by Progress' for seeding torrents (#3814) 2022-09-16 10:38:32 -07:00
Mike Gelfand 33f96810a1
Sync translations (#3799)
* Sync translations with code

* Sync translations with Transifex
2022-09-10 06:25:44 +03:00
Charles Kerr afa043c788
chore: inline short Formatter utils (#3792) 2022-09-08 20:17:29 -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
orbital-mango 4e22109113
Qt: Allow piece size selection on torrent creation (#3768) 2022-09-06 10:17:47 -05:00
Mike Gelfand ea14f91ac8
Sync translations (#3755)
* Sync translations with code

* Sync translations with Transifex
2022-09-04 13:59:04 +03:00
IMurzich 272f361237
Fix a progressBar direction for QT 5.15 (#3739) 2022-08-31 08:36:16 -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 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 6278ea7017
refactor: reduce use of tr_malloc / tr_free (#3652)
* refactor: avoid tr_new in macos Torrent.trashDataFile

* refactor: avoid tr_new in maco PiecesView

* refactor: avoid tr_new in qt createVariant()
2022-08-16 12:03:09 -05:00
Charles Kerr 293f4f6759
refactor: fix sonarcloud warnings (#3649)
* refactor: help sonarcloud to see that tr_bandwidth dtor does not throw

* refactor: use std::map instead of QMap in qt FileTreeModel
2022-08-16 09:30:05 -05:00
Charles Kerr 83ffa6bf1b
chore: fix spdx abbreviations (#3602) 2022-08-08 13:05:39 -05:00
Charles Kerr 31a733fab7
refactor: make tr_session_id a class (#3598) 2022-08-06 14:27:37 -05:00
Charles Kerr 868fc1ab78
Refactor/tr variant from buf (#3592)
* refactor: use std::string in tr_watchdir_inotify_on_event()

* refactor: add template tr_variantFromBuf() variant

if it has .data() and .size() it is good
2022-08-05 16:12:45 -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 bf8f72e61f
refactor: tr_metainfo_builder() (#3565) 2022-08-02 14:46:08 -05:00
Charles Kerr b889f0c395
chore: iwyu cstring, cstdlib, optional, unordered_set (#3532) 2022-07-27 16:53:39 -05:00
Charles Kerr ec79a2a888
fix: clang-tidy misc-const-correctness warnings (#3529) 2022-07-27 09:03:13 -05:00
Charles Kerr 1a0afbe95e
refactor: iwyu (#3525) 2022-07-25 21:45:54 -05:00
Mike Gelfand 9539484cdc
Sync translations (#3519)
* Handle default value for `PrefWindowSize` in code

* Add new Mac client resources to Transifex config

* Remove non-user-visible titles from XIB files

* Sync translations with code

* Sync translations with Transifex
2022-07-24 18:13:04 +01:00
Charles Kerr 445aad56a0
test: add platform tests (#3514)
* test: add tr_getDefaultDownloadDir() tests

this also indirectly tests xdg and homedir

* test: add PlatformTest.defaultConfigDirEnv

* test: add PlatformTest.defaultConfigDirXdgConfig

test: add PlatformTest.defaultConfigDirXdgConfigHome

* test: add PlatformTest.webClientDirEnvClutch

test: add PlatformTest.webClientDirEnvTr

test: add PlatformTest.webClientDirXdgDataHome

* fixup! test: add PlatformTest.webClientDirEnvClutch

fix: win32 breakage
2022-07-22 20:10:02 -05:00
David Miguel Susano Pinto f8b3514c0e
tr_makeMetaInfo: new anonymize option (closes #3420) (#3452) 2022-07-19 16:48:24 -05:00
Charles Kerr 36b70ed137
refactor: use svg icons in GTK client (#3395) 2022-07-03 17:14:13 -05:00
Charles Kerr 834f438cd9
fixup! feat: use jimmac ratio icon in qt client (#3399) 2022-07-03 13:34:01 -05:00
Gary Elshaw 083529c5bb
update the qt client's icons to svg (#3377) 2022-07-02 20:42:43 -05:00
Mike Gelfand cce1a15421
Sync translations (#3389)
* Sync translations with code

* Sync translations with Transifex
2022-07-02 04:10:12 +01:00
Dzmitry Neviadomski 534f9f7bc1
Update Copyright Year to 2022. (#3352) 2022-06-28 09:07:12 -05:00
FX Coudert b893289392
Rename Mac OS X to macOS (#3362) 2022-06-27 15:28:37 -05:00
Mike Gelfand 6d54287785
Sync translations (#3318)
* Sync translations with code

* Sync translations with Transifex
2022-06-18 21:44:13 +03:00
Charles Kerr 25fdb5805c
refactor: use tr_torrent_id_t (#3314)
* refactor: use semantic type tr_torrent_type_t in libtransmission

* refactor: use semantic type tr_torrent_type_t in gtk client

* refactor: use semantic type tr_torrent_type_t in qt client
2022-06-17 10:43:04 -05:00
Charles Kerr bf1d668f9a
refactor: make accessor functions constexpr (#3276) 2022-06-12 22:59:30 -05:00
Mike Gelfand 79d90167fd
Sync translations (#3184)
* Sync translations with code

* Sync translations with Transifex
2022-06-03 10:06:59 +01:00
Charles Kerr 256b436023
fix: clang 15 warnings (#3172)
* fix modernize-macro-to-enum libtransmission warnings

* fix readability-simplify-boolean-expr libtransmission warnings

* fix bugprone-unchecked-optional-access libtransmission warnings
2022-06-01 11:56:59 -05:00
Gary Elshaw d6a5f1462c
MacOS Transmission icons for QT (#3128) 2022-05-24 21:18:08 -05:00
sewe2000 4617776253
Add new information about when torrent was added to transmission in the Information Tab in transmission-qt (#3121) 2022-05-23 00:02:46 -05:00
Charles Kerr 67a078402d
fix: compiler warnings (#3123)
* fix: unused function warning tr_rpc_address_is_valid

* fix: unused variable warning old_byte_pop

* fix: method-can-be-made-static warning assertValidRules

* fix: signed-unsigned comparison warning

* fix: invalid case style warning for KBps

* chore: disable warning for static class member varaible
2022-05-22 21:22:34 -05:00
Antoine Cœur 42713c6716
OS X → macOS (#2986) 2022-04-26 09:11:44 -05:00
Antoine Cœur c708b83a3f
update documentation links (#2985) 2022-04-25 18:18:35 -05:00
Charles Kerr aa2bb367ab
chore: iwyu cleanup (#2981) 2022-04-24 20:49:52 -05:00