* (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
* 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
* refactor: mark subclass' destructors as override.
* refactor: use QUrl to parse announce URL strings.
The prompt for this was to work around a clang-tidy issue where
"char* host = nullptr;" triggers a "don't use varargs" warning,
but on the other hand it's also terser / cleaner.
* refactor: make the TorrentDelegate brushes const.
* refactor: s/auto/auto const*/ where appropriate
* chore: add some nonconst global warning exemptions
* chore: turn off warnings in GTest
* refactor: just disable the clang-tidy warning.
Apparently a std::array<T>::iterator is a T* on clang, since clang-tidy's
readability warning says we should use 'auto*' instead of 'auto'. However
adding that annotation fails on MSVC, where the is apparently _not_ a raw
pointer.
Since there's not a way to satisfy both of them at the same time, disable
the warning.
* refactor: make variant_headers reusable to qt app.
Torrent.cc's `change()` template methods are generically useful to deal
with tr_variant wrangling, but previously were only used in Torrent.cc.
This PR moves them into a new API `VariantHelpers.h` for use by Prefs,
Session, TorrentModel, etc.
* refactor: use snake_case field naming in qt client
* fix: some missed symbols
* chore: make uncrustify happy
* fixup! refactor: use snake_case field naming in qt client
This way all the qualifiers (`const`, `volatile`, `mutable`) are grouped
together, e.g. `T const* const x` vs. `const T* const x`. Also helps reading
types right-to-left, e.g. "constant pointer to constant T" vs. "constant
pointer to T which is constant".
There're places where manual intervention is still required as uncrustify
is not ideal (unfortunately), but at least one may rely on it to do the
right thing most of the time (e.g. when sending in a patch).
The style itself is quite different from what we had before but making it
uniform across all the codebase is the key. I also hope that it'll make the
code more readable (YMMV) and less sensitive to further changes.
Split FileTree.{h,cc} and FilterBar.{h,cc} files so that each class
is in its own file.
This breaks translations (some classes got renamed => context changed),
to be fixed by next commit (along with Tx sync).