- Rename the "size" locals using "sectors" in their name. Size may be
confusing or not enough specific as it can be interpreted a size in
Byte.
partSizeMap -> partSectorsMap,
totalSize -> totalSectors,
availablesize -> availableSectors,
size -> sectors,
minSize -> minSectors
maxSize -> maxSectors
- Create a the new local currentSector to iterate over the sectors;
instead of using the parameter firstSector.
- Remove the variable end that does not help much; too many variable
already. Expand its expression instead.
- Introduces new constructors for PartitionEntry: copy constructory and
constructor with all attributes.
- Use the new constructor in method addEntry().
- The variant helper toString() takes a default value since commit
c9f942ad6 ([libcalamares] Add default value to variant helpers).
- Set the default value to 0 and simplify the retreival of size values
by calling the helper toString() and removing the temporary variables.
- The logic of the method initLayout belongs to the object
PartitionLayout. Move logic to that object.
- Use a single method initLayout in object PartitionCoreModule.
- Member m_partLayout in object PartitionCoreModule is no longer
allocated.
The translation happens whenever this code is run, which may
not match the language the user subsequently selects.
It also causes general problems with the translation,
since we end up with a possibly-partly-translated name.
This lands Artem's work on supporting non-ASCII layouts better,
which currently only applies to Russian layouts -- it works with
a table, so it is easy to extend for other layouts.
The QML and Widget steps now completely share the Config backend,
which is why there's so many commits here: the Widget page needed
to have most of its code ripped out, and the models for
keyboard data were broken in various ways and needed fixing.
FIXES#1211
- With debugging and untangling done, the lambdas are simple
and short, so return to using them. One point of improvement
might be to give the models suitable slots themselves,
to avoid even this indirection.
- Use the just-refactored XKBListModel to store the xkb key-value
pairs for variants, drop most of the complicated implementation,
store just a single list of values.
- Remove code that is duplicated in Config.
- Hook up UI for physical keyboard model, and back.
- For now, introduce some named slots with debugging output.
This makes debugging a lot easier since we have function names
to work with rather than anonymous lambdas
- Config already *has* everythind, but drop the useless copies
and duplicated code from the Page
- Plug the models model into the Page
- While here, document the model / layout / variant distinctions
The code doesn't fill the UI properly, and the drop-down
for the models combobox is not right, but at least the data
is shared.