* refactor: add libtransmission-app
* refactor: add libtransmission-app/display-modes.h
* refactor: use app::SortMode, app:ShowMode in Qt client
* feat: add to_variant(), to_value() in serializer
* refactor: use app::SortMode in GTK client
* refactor: use app::ShowMode in GTK client
* refactor: make naming consistent with libtransmission-app
* refactor: remove Session::addKeyName()
refactor: remove Session::removeKeyName()
these should have been removed a long time ago
* fix: better logging on error in Converters
* refactor: add Qt-app-specific variant converters
* refactor: use tr_variant::unmanaged_string(tr_quark) when in torrent_get table mode
* refactor: libtransmission::serializer redesign
This is a followup to bf48eadaeb with several goals.
- `Converters` now has container-like concepts to make it Just Work
when a user tries to convert containers of T, e.g. std::vector<T>,
std::set<T>, QStringList, small:vector<T>, etc.
- `Fields` are now stored in a std::tuple instead of a std::array.
This has two important benefits:
1. `Fields` are smaller and can be made constexpr / consteval
2. We no longer need to use type erasure. The void pointer casts
and typeinfo lookups are gone and the new code is typesafe.
- naming cleanup:
- renamed the namespace to `libtransmission::serializer`.
- renamed the file to `serializer.h`
- renamed the tr_variant<->T converter registry class to `Converters`.
- removed use of the CRTP. You can now serialize any struct
without having to subclass `Serializable`.
I think I am done refactoring this for awhile.
* fix: naming is hard
docs: better code comments
* fix: clang-tidy readability-identifier-naming
* Update tests/libtransmission/serializer-tests.cc
Co-authored-by: Yat Ho <lagoho7@gmail.com>
* refactor: remove tr_variant<->int converter
* improve tests
---------
Co-authored-by: Yat Ho <lagoho7@gmail.com>