- previously, updateSwapChoicesTr() wanted to be a static free function,
but it needs QObject::tr() ; drop the unnecessary parameter (since it
is a member function).
QString -> Id for translations in the external API, to avoid
accidentally converting a QLocale name (e.g. ca_ES) into a
Calamares translation name. This preserves special-cases
like ca@valencia and sr@latin.
- enforce consistent [PYTHON JOB]
- use CDebug() constructor, because the convenience macro's
introduce the function name -- that's the C++ function, so
it isn't useful for logging.
- when activating the page, the "guess" functions do their
work and afterwards the config is left in a "guessable"
state, but if the user makes a specific choice, then
the config leaves the "guessable" state and the user's
explicit choice is preserved.
FIXES#1744
- expose only intended API, guessLayout() becomes internal and static
- rename onActivate() since it was *called* for activation, but does
something totally different.
- Long and complicated, nested, lambdas are not convenient for reasoning.
- The debug messages from the innermost lambda have a totally useless
function name, which makes debugging harder.
- do not link (explicitly) to Calamares libraries, the CMake
functions do that automatically.
- while here, tidy and remove commented-out-bits
- while here, remove unneeded includes
- Modules and plugins don't need to mention libcalamares themselves
for linking -- we can do that automatically. Use the IMPORTED names
so that it works in Calamares main repo and external repositories.
- Complain about unknown module types.
- the message had been arbitrarily changed; change it back
- update (warning) message when there is progress in checking the
model, so it doesn't stay at "unchecked" until you change language
- minor clean-ups
Just have **one** Retranslator object, and install it as event-filter
(this needs to be done manually on a top-level widget) and use
signals / slots to do the actual work, rather than filtering
in multiple places and doing our own mediocre version of binding-
signal-to-lambda.
- The Config object owns the requirements model, and has messages /
strings describing the state of the model. Use that message,
dropping the duplicate message from the requirements widget.
- Re-jig to pass the Config object around rather than the model
that it owns.
- This does not work, because translation events do not arrive
(and the slot isn't called automatically either).