Now that Calamares is compiled as C++17, we get this:
src/modules/locale/timezonewidget/TimeZoneImage.cpp:28:55: warning: out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated [-Wdeprecated]
/* static constexpr */ const QSize TimeZoneImageList::imageSize;
The code doesn't match the comment: there are no by-ref captures
in the code, and the shadowing of parameters and local variables
is confusing. Remove one variable that is passed in as an argument
(and just pass the value as argument) and copy-capture the other
rather than doing weird argument passing.
- remove unused this captures from lambda
- rename variables that are short, cryptic, and shadowed
- remove documentation for parameters that don't exist
This commit adds the new configuration `swapPartitionName` to the file
partition.conf.
This option sets the partition name to the swap partition that is
created. If this option is unset, the partition is left unnamed.
- only widgets get language change events, so we need to
hook that up to the ViewSteps and inform the Config
object so that it can (re)load translations for the
keyboard data.
- 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.