Some compile flags changed recently, triggering assert()
in the jobqueue when there is more than one. There's no
real reason for JobQueue to be a singleton, but it wants
to be. So clean up pointers a little more enthusiastically.
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
- 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.
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