- use updateGlobalStorage() for both single-selection and
model-based approaches, although the model-based one
needs extra parameters.
- complain about inconsistent settings and API calls (e.g.
setting a model and single-selection at the same time)
- pkgc -> packageChoice and similar for methods, variables
- document that this is the convenience value for one-selection
QML modules, not a full model
- use std::optional to keep track of which one is being used.
The Config object can hold all of the configuration information,
including also the requirements-checking parts. Move requirements-
checking configuration there, so it is shared and consistent
across welcome and welcomeq, regardless.
This repairs the test that expects the Config object to handle
**all** of the configuration, too.
- Branding, Settings, and ModuleManager may all be nullptr,
in which case the corresponding code shouldn't call methods
of those instances -- this is demonstrated by just creating
a Config object
- 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.
- 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
- 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
- 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).
Rather than Config asking its (owning) ViewStep what the title
is -- all existing implementations have a prettyName() for that --
move the title into Config and re-do-the ViewSteps to use it.
Rename init() to something meaningful.
- the Page displays a simple message describing what the
summary is all about; Config has the same message,
use that. Needed some re-jigging to get the signals
and slots right.
- Create Config object, even if it's not used just yet
- Introduce onLeave() for the Page, better name than
(re-)creating the content (!?) when leaving
Config classes, which intend to be shared between widgets-
and QML-based view-steps, should not tie closely to internals.
None of the ParserStatus methods are used in a meaningful
way (init() can be called by the view step).
(This assertion may be dialed back if the Config object is used
in the summary ViewStep, which will want to get at the widget
pointers, but that's for later)
- filter() returns the items for which the predicate is True;
we want to keep the subvolumes that do not have an explicit
partition already associated.
- need list() to hammer it back into a list for appending swap subvol.
function added to store selections from packagechooserq
line 103 in Config.cpp needs adjusting to restore working regular widget based packagechooser
prettyStatus added, made visible in packagechooserq only, ViewStep not altered in packagechooser for this yet
initial work done by Nitrux/Camilo Higuita in 2020, reflected in license headers
C++ adjusted to make it build & work
as noted in the inline comments e80618ef1c
there are quite a few errors in the C++, but it builds, runs and shows the correct output
will be used in summaryq, reading from widgets not an option
section probably better suited for Config.cpp/h, since quite a bit of duplicated code from
createSummaryWidget
In 942221c764 the fixed-setup
(with /@ and /@home) was replaced by the configurable btrfs
layout, but the default went away. Restore the two-subvolume
layout if nothing is configured.