Julien
4b8cfa2e57
chore: update copyrights to 2023 ( #4834 )
2023-02-11 14:49:42 -06:00
Mike Gelfand
192a76b621
Move GTK compatibility definitions into a separate header ( #4493 )
...
* Move GTK compatibility macros into a separate header
* Fix Cairo compatibility checks
* Move Glib-namespaced definitions to GtkCompat header
* Remove unused stringify definitions since we're using fmtlib
2022-12-29 02:42:20 +00:00
Mike Gelfand
a89b181f2c
Include individual headers (GTK client) ( #4477 )
...
This results in up to 15% single-threaded build time reduction.
2022-12-27 01:43:20 +00: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
Mike Gelfand
2bd6c8aff4
Fix issues reported by clang-tidy `cert` checks (GTK client) ( #4174 )
...
* Fix `cert-err33-c` clang-tidy issues
* Fix `cert-str34-c` clang-tidy issues
* Fold free-standing functions into `FilterBar::Impl`
This is in preparation to next commit fixing `cert-err58-cpp`.
* Fix `cert-err58-cpp` clang-tidy issues
* Extend clang-tidy configuration
2022-11-15 00:53:12 +00:00
Mike Gelfand
49ce12ce38
Fix issues reported by clang-tidy `cppcoreguidelines` checks (GTK client) ( #4158 )
...
* Fix `cppcoreguidelines-pro-type-cstyle-cast` clang-tidy issues
* Fix `cppcoreguidelines-pro-type-member-init` clang-tidy issues
* Fix `cppcoreguidelines-prefer-member-initializer` clang-tidy issues
* Introduce `PageBase` for `PrefsDialog` pages
This is in preparation for next PR fixing `Glib::Timer` memory
management.
* Fix `cppcoreguidelines-owning-memory` clang-tidy issues
* Fix `cppcoreguidelines-pro-bounds-array-to-pointer-decay` clang-tidy issues
* Fix `cppcoreguidelines-special-member-functions` clang-tidy issues
* Fix `cppcoreguidelines-init-variables` clang-tidy issues
* Fix `cppcoreguidelines-macro-usage` clang-tidy issues
* Fix `cppcoreguidelines-pro-bounds-constant-array-index` clang-tidy issues
* Fix `cppcoreguidelines-non-private-member-variables-in-classes` clang-tidy issues
* Fix `cppcoreguidelines-pro-type-vararg` clang-tidy issues
* Fix `cppcoreguidelines-pro-bounds-pointer-arithmetic` clang-tidy issue
* Fix `cppcoreguidelines-pro-type-reinterpret-cast` clang-tidy issues
* Fix `cppcoreguidelines-pro-type-static-cast-downcast` clang-tidy issues
* Extend clang-tidy configuration
Enable all `cppcoreguidelines` checks except for three (`avoid-magic-
numbers`, `avoid-non-const-global-variables`, `narrowing-conversions`)
which require [more] extensive refactoring and were left for later.
2022-11-13 17:36:16 +00:00
Mike Gelfand
eec93de5ca
Fix issues reported by clang-tidy `readability` checks (GTK client) ( #4127 )
...
* Fix `readability-container-data-pointer` clang-tidy issues
* Fix `readability-container-size-empty` clang-tidy issues
* Fix `readability-isolate-declaration` clang-tidy issues
* Fix `readability-convert-member-functions-to-static` clang-tidy issues
* Fix `readability-else-after-return` clang-tidy issues
* Fix `readability-redundant-member-init` clang-tidy issues
* Fix `readability-uppercase-literal-suffix` clang-tidy issues
* Fix `readability-make-member-function-const` clang-tidy issues
* Fix `readability-simplify-boolean-expr` clang-tidy issues
* Fix `readability-qualified-auto` clang-tidy issues
* Fix `readability-avoid-const-params-in-decls` clang-tidy issues
* Fix `readability-implicit-bool-conversion` clang-tidy issues
* Fix `readability-inconsistent-declaration-parameter-name` clang-tidy issues
* Add initial .clang-tidy configuration
Currently enabling readability checks only, others to follow. Of the
four disabled readability checks, three (function-cognitive-complexity,
identifier-length, magic-numbers) require extensive refactoring and were
left for later, and one (redundant-access-specifiers) is not planned to
be fixed due to the current coding style - using extra sections to
separate methods from variables of the same visibility.
2022-11-09 16:58:36 +00:00
Mike Gelfand
5564d9eb46
Catch dbus exceptions in async callbacks on completion (GTK client) ( #3997 )
...
GLIBMM will catch them for us, but in two cases print a warning instead
of suppressing, and in one other case still print a warning (as well as
we do) but without context.
2022-10-19 16:27:07 -05:00
Mike Gelfand
ae2dd5eba9
Use fmt for string formatting (GTK client) ( #3967 )
2022-10-15 19:13:50 +03:00
Mike Gelfand
9f0fbb38ec
Support change to enum definitions in gtkmm/glibmm/pangomm ( #3801 )
...
Newer versions (gtkmm 4 and its dependencies) of these libraries have
switched from enums to enum classes. Wrap the names with macros to
support both.
2022-09-10 16:19:54 +03:00
Charles Kerr
29f57bc296
chore: iwyu headers ( #3661 )
2022-08-17 11:08:36 -05:00
Charles Kerr
1a0afbe95e
refactor: iwyu ( #3525 )
2022-07-25 21:45:54 -05: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
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
df1cca9b57
chore: update copyright years, make notices consistent ( #2463 )
2022-01-20 12:27:56 -06:00
Charles Kerr
3036a76beb
fix: sonarcloud code smells ( #2421 )
2022-01-17 12:39:50 -06:00
Mike Gelfand
3e072f9bd4
Fix most of critical issues reported by Sonar (GTK client) ( #2309 )
...
* (C++) Macros should not be used to define constants
* (C++) Memory should not be managed manually
* (C++) "void*" should not be used in typedefs, member variables, function parameters or return type
* (C++) When the "Rule-of-Zero" is not applicable, the "Rule-of-Five" should be followed
* (C++) "switch" statements should have "default" clauses
* (C++) "explicit" should be used on single-parameter constructors and conversiosn operators
* (C++) Non-const global variables should not be used
2021-12-14 11:43:27 +03:00
Charles Kerr
2977636d58
fix: sonarcloud warnings ( #2260 )
...
* fix: add-explicit-keyword-to-constructor warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuB-2farvsyMPiZl&open=AX1tyuB-2farvsyMPiZl
* fix: use a structured binding declaration
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuHH2farvsyMPiZm&open=AX1tyuHH2farvsyMPiZm
* Fix implicit-conversion-loses-precision warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuH22farvsyMPiZn&open=AX1tyuH22farvsyMPiZn
* fix use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuO42farvsyMPiZw&open=AX1tyuO42farvsyMPiZw
* fix implicit-conversion-loses-precision warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuO42farvsyMPiZs&open=AX1tyuO42farvsyMPiZs
* fix: implicit-conversion-loses-precision warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuO42farvsyMPiZt&open=AX1tyuO42farvsyMPiZt
* fix handle-this-exceeption-or-do-not-catch-it warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1y7t12cIz3krp3mVpV&open=AX1y7t12cIz3krp3mVpV
* fix make-this-variable-a-reference-to-const warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1y7t12cIz3krp3mVpW&open=AX1y7t12cIz3krp3mVpW
* fix replace-redundant-type-with-auto warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1y7t12cIz3krp3mVpY&open=AX1y7t12cIz3krp3mVpY
* Fix use-try_emplace-instead-of-emplace warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0WPk3QwxvzFbF6whWN&open=AX0WPk3QwxvzFbF6whWN
* Fix: make-this-a-pointer-to-const warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0bZPUXjI_aUyxGBxB4&open=AX0bZPUXjI_aUyxGBxB4
* Fix use-std::make_unique warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0WPk0twxvzFbF6whWC&open=AX0WPk0twxvzFbF6whWC
* Fix: replace-push_back-with-emplace_back warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0BraL_0QLXO0pQ_Bfv&open=AX0BraL_0QLXO0pQ_Bfv
* Fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0bZPXajI_aUyxGBxB8&open=AX0bZPXajI_aUyxGBxB8
* Fix: replace-redundant-type-with-auto warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0bZPXajI_aUyxGBxB9&open=AX0bZPXajI_aUyxGBxB9
* Fix: replace-emplace-with-try_emplace warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0bZPXajI_aUyxGBxB_&open=AX0bZPXajI_aUyxGBxB_
* Fix: extract-assignment-from-operation warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0bZPXajI_aUyxGBxCA&open=AX0bZPXajI_aUyxGBxCA
* Fix use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1op6_hUBCnp-Grmra8&open=AX1op6_hUBCnp-Grmra8
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0L8qgMUnpKTxYiu5CN&open=AX0L8qgMUnpKTxYiu5CN
* Revert "Fix use-std::make_unique warning"
This reverts commit 463a742f34
.
* fix: make-parameter-a-pointer-to-const warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX06St241usi2gyYkPTZ&open=AX06St241usi2gyYkPTZ
* fix: make-parameter-a-pointer-to-const warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX06St241usi2gyYkPTa&open=AX06St241usi2gyYkPTa
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX01Itn2f_SST5i7BN1o&open=AX01Itn2f_SST5i7BN1o
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AXziv55-MuQoG-Y-NgLX&open=AXziv55-MuQoG-Y-NgLX
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0_a_JGNJn7rAzml_68&open=AX0_a_JGNJn7rAzml_68
* fix: replace-redundant-type-with-auto warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AXzyMRYbK9dvryvWm8XA&open=AXzyMRYbK9dvryvWm8XA
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AXziv52fMuQoG-Y-NgLW&open=AXziv52fMuQoG-Y-NgLW
2021-12-01 17:11:57 -06:00
Charles Kerr
34881f6295
refactor: make parts of tr file private ( #2241 )
...
* refactor: make parts of tr_file private
2021-11-27 21:17:47 -06:00
Daniel Kamil Kozar
5df3505832
Add a "Start Now" action for newly added torrent notifications in the GTK client ( #849 )
...
* Add a "Start Now" action for newly added torrent notifications in the GTK client
* Const placement
* Compilation fixes
* post-merge fix
* Morph torrent_start_now into Session::start_now
2021-11-08 20:21:20 +03:00
Mike Gelfand
eaeed301fa
Rename GTK client files to match the classes they contain ( #2073 )
...
This also brings naming closer to Qt client which simplifies things a
bit.
2021-11-01 03:11:23 +03:00