- The configuration for writing the hostname (to /etc/hostname,
to /etc/hosts and possibly to systemd-hostname) is read-only,
because it comes from the config file and won't change after.
- add the "reuse user password for root" setting to Config,
make the UI page follow that setting.
- add the require-strong-password default and toggle settings to
Config; this is not well-checked yet.
On the widget / UI side, connect checkboxes only if they are
visible; refactor reuse-user-password-for-root settings.
- The language code "ie" is not recognized,
- "ia" is, and it seems to be the post-war variant of
Interlingue, so we may want to rename / relabel.
The testEsperanto test -- now split into scripts and
esperanto -- would have picked "ie" out of the list
because it does map to C locale.
The TODO said it was unused: it **is** used, but only in
a very limited scope. Drop it from jobs where it wasn't
useful (e.g. those that just return prettyName(), outside
of the partition module).
This builds some machinery so that we can create
a detector for member-functions (methods) named <whatever>.
Use the macro to build the machinery:
DECLARE_HAS_METHOD(myFunction)
then after that,
has_myFunction<T>
is either std::true_type or std::false_type
depending on whether T has a method myFunction.
- The enum for install choice was copied into PartitionActions and
used in the Config object; its definition does not belong in the UI.
- Chase the renamings required.
- add an option to select what button should be selected when the
partitioning module is started; TODO: the actual functionality is
**not** implemented.
- drop the previously suggested name, which didn't get beyond the
comments-in-the-config-file stage (but which intended to do the
same things as this one)
- add option to schema already, even if it's not implemented.
See #1297
FIXUP conf
The encryption widget (passphrase for disk encryption) should show
ok / warning / error whenever the state changes; this avoids
it showing up first with **no** icon (it should show a warning
when both passphrases are empty).
Both the KPMCore and the ChoicePage -- asynchronously -- were connected
to the nextStatusChanged() signal. So if the core said next was true,
that could end up communicated to the ViewManager, enabling the *next*
button in the UI.
Changing to the *erase* page generally triggers a KPMCore reload,
which later emits a `hasRootMountPointChanged()` signal, once the
layout is applied and the disk gets a root mount point. So we'd
get a `true` from KPMCore, which -- because it was connected directly
to the signal to the VM -- would override any other considerations.
Hook up both signals to an intermediate slot that just recalculates
whether the next button should be enabled, based on the state
both of the Choice page and whatever else.
- drop groups from the viewstep
- note that the Config object should also be in charge of creating
Jobs (but then the de-tangling needs to be completed)
- add tests of default groups loading
Doesn't compile because QRegExpValidator is a gui thing.
Previously, we check for RCC support every single time CMake runs.
This is slightly wasteful, and it wasn't being done right anyway.
But it's moot because:
- Calamares supports back to Qt 5.9
- Qt 5.9's version of rcc (at least, 5.9.7) **does** support the
command-line argument `--format-version 1`
- Everything newer does too.
Simplify translations a little, too: just use autorcc rather than
building things by hand.
- The sources were in src/calamares but processed and generated
in libcalamares, which is weird at best.
- Generate an "extended" version header.
- Use the extended version in the logger and nowhere else.
- While here, minor coding style cleanups
The overall change here means that after running CMake, only
Logger.cpp needs to be rebuilt (if the extended version has
changed) and not a handful of other files that don't need the
full version number, but do happen to include CalamaresVersion.h
- Very rarely do we need the full-git-version of Calamares,
so split that into a separate header with a little trickery.
- In the "normal" version header, drop the full-git-version values.
- This is a half-step: the ViewStep shouldn't do job creation either,
eventually it needs to be the Config object, but this is better
than asking the widget (UI) to create some jobs.
- When updating login- or host-name, or the autologin setting,
set it in GS as well. This is a minor improvement over doing
it only when leaving the page.
- Since the Config object isn't complete, there are leftovers in
the widget, which has a fillGlobalStorage() for the not-jobs-related
bits previously in createJobs().
- since the configuration is in the UI parts, we need the widget still
to load the whole configuration (until the config object is complete).
Create the widget before doing configuration; this is wrong. But now
we don't hit nullptr derefs all over.
- make the HostName textbox just a view on the Config's HostName
- make the username and login textboxes view onto Config
- query the Config rather than the UI for job data
- delay construction of the Page (widget) until it's needed
- hand the Config object to the Page on construction
This is prep-work for putting the configuration information into the
Config object, rather than in the UI elements.
- most of the things in utils/ are in the CalamaresUtils namespace,
let Permissions follow suit. Chase the name change in the
*preservefiles* module.
- add an `apply()` function for doing the most basic of chmod.
Note that we don't use `QFile::setPermissions()` because the
**values** used are different (0755 for chmod is 0x755 in the
enum value passed to `setPermissions()`).
On the "Users" tab, the user can choose a username. It was possible to
use 'root' as username, which led to an installation error, because
'root' exists already.
Added a new check to the username validation.
Fixes#1462.
With PR calamares/calamares#1357 the label of the "Manual partitioning" option
was changed, which introduced several downsides:
* The label is shown for UEFI and for BIOS installations.
* The mountpoint of the ESP is and should be distro specific.
* The label always mentioned GPT, which is irrelevant.
* The label should explain, what the option does, and not, what
problems can occur under certain circumstances.
set index in i18n.qml to -1, old settings were just for reading from the bogus model
current model uses strings, so index fails to read from it. This fixes cala crashing on loading i18n.qml
- Expand the documentation, emphasize octal-vs-decimal
- east-const consistently in this file (most of Calamares is west-const)
- shuffle the is-valid bool to the end of the data members,
so sorting by size.
- already had methods for various kinds of broken-up data, but
not one for plain "region/zone" strings; having this makes
it easier for QML to report a zone.
- use the region/zone method from QML, so that clicking on the
world map updates the actual TZ in Config.
- get network status from the global Network object; document that
- get the strings describing the language and LC settings from
the config-object instead of roll-our-own
- use the model of supported locales from Config to populate listboxes
- connect selection of language or LC to the Config object
- remove stray and useless TODOs
- remove unnecessary empty overrides
- clean up includes
- drop all the code that is now in Config
Since the business logic (setting locations, maintaining GS, ...)
is all in the Config object, the ViewStep is remarkably simple:
hook up a UI to the Config, which in the case of QML is done
automatically.
- since the Page hooked up a model and changed the region-selection
**after** connecting to signals, it would reset the location
to Africa/Abijan (alphabetically the first timezone) during
construction. Don't do that.
- this doesn't do the lookup **yet**
- while here, refactor setConfigurationMap so it reads like a story,
with chunks bitten out into a handful of static inline void methods.
- read the *region* and *zone* settings; this duplicates what
the ViewStep does and is currently unused, but ..
- add new support for using the system's TZ (rather than
the fixed values from *region* and *zone*). This complements
GeoIP lookup.
This is the actual feature that started the long rewrite of
the Config object (so that all the business logic would be in
one place, usable for both widgets and QML).
FIXES#1381
- writing *localeConf* settings to GS can be done always when the
formats are set, rather than special-cased. The code
that handles the "special case" of no widget existing for the ViewStep
overlooks the other crashes that happen then.
- Since Config knows what jobs to create, just ask it rather than
keeping a copy.
- allow finer-grained control over whether-or-not to adjust the
timezone in the live system.
- handle some special cases at the point of loading-configuration.
- document the setting in locale.conf
- correct some documentation bugs
- adjust the YAML schema for locale.conf so it's legal YAML syntax
**and** validates the current file.
- since all locale changes need to be entered into GS anyway, this
is something the Config object can do because it is the source
of truth for locale settings.
- drop all the GS settings from the Page.
- remove the weirdly-structured prettyStatus and similar:
the Config object has human-readable status strings (three,
for location, language, and LC-formats) which can be
normal properties with signals.
- Implement prettyStatus in the view step by querying the Config.
- the language and LC settings migrate from page to config
- add API for explicitly setting language (which is then preserved
when clicking new locations)
- since Config knows what settings there are, it should create the
jobs to run later -- not the Page.
- this doesn't work yet, because the Config does **not** know what
the selected timezone is yet.
The Config object wasn't being used at all in the locale module;
reset it to empty and start using it in locale, so that
configuration functionality can be added to it as-needed,
and with the necessary refactoring built-in.
In 022045ae05 a regression was introduced: if no *slideshowAPI*
is specified in the branding file, Calamares refuses to start, with
a YAML failure.
Before the refactoring, we had `YAML::Node doc` and looked up
the *slideshowAPI* in it with `doc["slideshowAPI"]`. After the
refactoring, we had `const YAML::Node& doc`. The `const` makes
all the difference:
- subscripting a non-existent key in a mutable Node silently
returns a Null node (and possibly inserts the key);
- subscripting a non-existent key in a const Node returns an
invalid or undefined node.
Calling IsNull() or IsScalar() on a Null node works: the functions
return a bool. Calling them on an invalid node throws an exception.
So in the **const** case, this code can throws an exception that it
doesn't in the non-const case:
`doc[ "slideshowAPI" ].IsScalar()`
- Massage the code to check for validity before checking for scalar
- Add a `get()` that produces more useful exception types when
looking up an invalid key
- Use `get()` to lookup the slideshow node just once.
- previously, the first column (name) was sized to show the
names **that were visible at startup**, which fails when
there are long names hidden in groups that are not expanded
immediately.
- change the columns to resize according to the contents; this makes
the descriptions jump to the right as the name column gets wider.
FIXES#1448
- there are no consumers for checking-the-capacity-of-the-drive
This parameter was introduced in 3cd18fd285 as "preparatory work"
but never completed. The architecture of the PartitionCoreModule
makes it very difficult to get the necessary parameters to
the right place, and it would probably be better to put
a SortFilterProxyModel in front of a partitioning model anyway.
Since the display code can already filter on size, just drop this one.
- make the rectangles slightly larger
- align text to center of the rectangle
- make the rectangle fill out the column; without this, the
width would collapse back to 0 after a change in the model,
which would draw 0-width rectangles.
FIXES#1453
- continuations, for the console, no longer print the date + level,
which makes things easier to visually group and read.
- the file log is mostly unchanged, except it contains more spaces now.
- fix the schema so the schema is valid json-schema
- the schema doesn't actually validate the *operations* yet
- sort the named backends (needs a double-check that the
list covers all the ones we currently support)
SEE #1441
- Don't do in code what is already done in the designer (.ui) file
- setFrameStyle() is difficult because it mixes different enums
into an int, which causes the warning from clang.
- Add access to the panel-sides membe of the view manager, and
calculate which sides are populated by panels (if any).
- Pass the calculated panel-sides to the view manager before it
starts adding viewpages, so they get consistent margins.
- Give classes a virtual destructor that need them
- Remove spurious ;
- Refactor addJobs() because that doesn't need to be in a class
- Remove redundant intermediate base-classes
- Some variant helpers take a default parameter if the map does not
contains the given key or if the type mismatches. Make all helpers
behave the same.
- Initialize the attribute partAttributes to 0; it is a primitive type
and it is not initialized in some constructors.
Fixes commit c1b5426c6 ([partition] Add support for partition attributes).
- Move implementation of default constructor to cpp.
added missing components listed as ResponsiveBase, ListItemDelegate & ListViewTemplate
parts of which were on nitrux
keyboard.qml no longer uses buttons within ListView, can't work as buttons and have them visible
see https://doc.qt.io/qt-5/qml-qtquick-listview.html#footerPositioning-prop
set ListView as actually visible within a normal calamares window size
- If the 'no tracking' box is checked, then the way to uncheck
it is to tick some **other** box.
- It doesn't make sense to unselect 'none' and then have .. none
selected.