- introduce NamedEnum lookup tables for interface and type
- drop "final" and "virtual" from methods that don't make
sense as virtual
- shuffle declaration order so the virtual API for modules
sits together
- Trying to get away from untyped strings with special meaning.
- The "split identifier" branch tried the same thing, but
was duplicating the existing InstanceKey.h work.
- need a configuration before we can start loading (to support
the variable search paths)
- refactor showing a failure in the spinner widget. On failure,
the spinner will never go away, so a message for the user is good.
- stop clang-format from messing up the table of names.
- start of a class to hold configuration information; this can
later be substituted into the WelcomeViewStep and filled from
setConfigurationMap()
In the example application:
- register the Config type
- test application to display the QML (this will be extended
with adding the locale model to it)
- sample QML that does nothing useful yet (will display the locale
model once it's there)
- all the TZ location information now lives in the Calamares
locale service and the TZ list
- replace the Location class that was local to the timezone
widget by the TZZone class
- chase a bunch of small API changes that this needs
- Split the actual loading of translations into classes
to encapsulate the loading logic,
- Build a collection of classes to do the different kinds
of translation loading,
- Build a generic function to load something and update a
static pointer to the translation.
This makes installTranslator() much easier to read, and encapsulates
the type-specific loading somewhere else. While here, add a timezone-
translations loader so that the split-out TZ translations also work.
- Hide the one file from lupdate by giving it a weird suffix
- Call lupdate a second time for the timezone translations
- While here, adjust so that the options precede the directories
they are supposed to affect
I don't want to give the translation teams 444 new strings all
at once (about 90% of which don't need translation).
- Used in only one place, move to .cpp
- Drop useless scaling all the images *are* that size already
- Add debugging check that the images match expected size
- search for a key and return a type-cast pointer to the result
- while here, simplify some other code
- the find() function could be done with std::find_if but doesn't
get any shorter or more elegant
- By using QList< CStringPair* > consistently, we can save
a bunch of model code at the cost of an occasional dynamic_cast;
it's fairly rare for there to be a need for the derived pointer.
- read the file and create the regions on-the-fly, then sort the
resulting list (instead of building a string list and then
building the regions afterwards)
- needs a qwidget to put the top-items (license name, button) in
- fixes issue where the gap between the button and the hrule would
change depending on what is expanded
- Move layouting code into the .ui file
- Reduce margins hugely -- atop the title block, around the
scroll area, etc -- so that more license is visible at once.
- split shared <h1> message off
- do some string-concatenation, but only of whole sentences
- shave off some vertical space by dropping the mainsubtext item
- In code, add the necessary bool
- document meaning in the config file
- actually expand the full text if the entry is local and set to expanding-
by-default. This implementation is a bit lazy since it just pretends
to click on the toggle button.
- While here, reduce scope for UB by initializing POD members
- The arrows Up, Down, Right are used on toolbuttons, but
in the context of this module, those are directions with
meaning; give them better names.
- Because of #1268, the meaning of up- and down- may be swapped;
I'm not sure of which look makes the most sense. This is prep-
work for easily swapping the looks by using the meaningful names
instead.
SEE #1268
- we loop over all the entries anyway, so calculate allLicensesOptional
along the way (debatable whether std::none_of is clearer)
- always un-check the accept-box when resetting entries.
- Toggling the checkbox could disable the next button
because only the checked-state was used, instead of
the next-is-enabled-if-everything-is-optional member variable.
FIXES#1271
- Move retranslation to a separate slot to allow it to be
formatted nicely.
- Use calculated m_allLicensesOptional in retranslation.
- Untangle determining if all licenses are optional; std::none_of
returns true on an empty list.
- this isn't really a Calamares thing to decide, and anyway centering
on the desktop is kind of weird in multi-monitor setups and the
DesktopWidget is deprecated as well.
- Scenario: *keepDistribution* is true, and the existing file contains
a GRUB_DISTRIBUTION line **followed** by a commented-out GRUB_DISTRIBUTION
line.
- In that case, the commented-out line would change the flag back to
False, and we'd end up writing a second GRUB_DISTRIBUTION line at the end.
Prevent that: the flag can only go to "True" and then stays there.
Editorial: If your grub configuration would have tripped this up, then
you're doing something wrong. Clean up the configuration file first.
- If we update the line, then GRUB_DISTRIBUTION has been set
- If we don't update the line (e.g. because of *keepDistribution*)
then a comment doesn't count as "have seen that line".
This means that if we get to the end of the file, with only commented-
out GRUB_DISTRIBUTION lines, and *keepDistribution* is set, then we'll
still write a distribution line -- because otherwise it's not set at all.
- Previous fix would erase the distribution information (using an
empty string to flag 'preserve existing GRUB_DISTRIBUTION lines'),
but that is fragile. A distro might set that, and yet **not**
set a GRUB_DISTRIBUTION line, in which case it would end up with
a setup without any GRUB_DISTRIBUTION set.
- When a GRUB_DISTRIBUTION line is found, **then** check if it should
update the line or not. This way, we have a suitable distribution
to write if no GRUB_DISTRIBUTION is found at all.
- move the explicit checking for non-empty into a specific
(normal) password check
- leave only the-two-fields-are-equal outside of the password-
requirements framework
- having non-empty is the same as minLength 1, but gives a different
error message
- the two explicit checks are the ones that handle *two*
strings as special cases; all the other checks from
the password-requirements system only handle the one string.
- the explanations under and around the boxes is noisy,
hard to size correctly (viz. issue #1202)
- use tooltips in almost-all fields instead
- add placeholder text to be more suggestive
- since the wording of the checkbox itself (and the functionality)
is to enforce strong passwords, need to switch out some
logic and fix the wording of the documentation.
- The "convenience" method was no longer convenient, since
we now place strings on the buttons by default.
- While here, **name** the buttons so they can be themed.
- if the welcome module wasn't loaded (or loading otherwise failed)
then no text was set, leading to confusing screens with
buttons with icons but no label.
- If a module exists, and has unmet dependencies, then
that is only a problem if the module itself is *used*.
Merely existing is ok.
This triggers on FreeBSD, where partition isn't built, but
bootloader depends on partition -- so you can never start
Calamares on FreeBSD, because bootloader depends on something
non-existent.
Relax the check: just warn, and only fail if a non-existent
module is used (all those with unmet dependencies are considered
non-existent).
- Calamares scans **all** subdirs of the module-directory
for a module.desc and complains about those that don't have
a module.desc.
- For ./calamares -d runs from the build-directory, this
leads to a few complaints when some plugins have been
ignored (and so no module.desc is generated for them).
- Give the whole entry to file_copy, not just the
destination. This will allow file_copy to work
with local excludes.
- Pluck entry.destination out immediately, to keep
code changes minimal.
- Document the parameters.
- list_excludes() turns the extra mounts from global storage
into --exclude parameters for rsync; it doesn't do anything
with the destination parameter.
- while here rename to something more descriptive
- it's ok if item one creates directories where item two will write,
so don't check for existence of all directories on start-up.
Reported by ArcoLinux.
FIXES: #1252
This adds to the *machineid* module (which generates random UUIDs
for DBus and systemd) another key to configure generation of
a urandom pool in the target from the entropy in the host system.
- Improve documentation of the settings
- If sysconfigSetup is true, **only** setup sysconfig and ignore
the rest. This seems to be consistent with existing openSUSE-
derivative distro's, which set displaymanagers to something
nonsensical.
- the *mount* module inserts a rootMountPoint without trailing /
into global storage, so we can't assume that here. On the other
hand, the paths passed in to the Worker functions are absolute
paths -- adjust the tests to follow that.
- The code in Workers.cpp assumes that rootMountPoint ends in a /
so that it can have filenames appended easily; make the tests
fit that assumption, but still need to check that it is so in
production.
- refactor running the command into a helper function,
to deal with the regular if-command-failed-then-complain pattern.
- mark parameters as unused.
- move distinction about kind of DBus file up into the MachineIdJob
and remove the enum that marked it.
- Testing some of the functionality that's been added just now:
- copyfile fails, buggy implementation
- poolsize fails, buggy implementation
- removefile not tested
- read-urandom or copy-existing-file are implemented
- fairly chatty on failure
- needs tests (probably the implementation should be moved to
a separate file and unit-tested)
- keep the rootMountPoint and the path-with-random-data separate
instead of concatenating them at the beginning. Then we can
use the "clean" names also within the host system.
- this could be named isValid() instead, but basically the idea
is that this code makes sense:
JobResult r = do_thing();
if ( !r ) { /* Error happened! */ return r; }
/* Carry on .. */
- remove existing files for each kind of random-generation
that is enabled. There's a helper function for the case that
Cala is no longer setuid and needs help to remove those files
from the target (e.g. a setuid helper).
- Just use the existing rsync code, which can do both
files and directory trees.
- The existing code assumed we were always copying directories.
Now double-check beforehand.
- if a default DE is configured but the executable doesn't exist,
believe the .desktop file. Then use that, and warn if the
whole thing can not be found.
- for a DE entry which has a bad executable setting,
update the entry from the .desktop file using TryExec.
This assumes that the TryExec command is actually something
you might want to run.
- Moc generates Q_UNUSED(_a); which in turn (with clang) issues
a superfluous-semicolon warning. Existing code with automoc
uses utils/moc-warnings.h to turn off warnings that are issued
on moc code. Include it explicitly here because automoc isn't
applied.
- Sessions can be X11-sessions (living in xsessions) or Wayland-
(living in wayland-sessions). Look in both places.
- Refactor code a little to make it nicer to read.
- Drop the 1-argument QString constructor, it is suprising
- Drop the conversion to QString
- Add a toString() instead
- Drop tests for the removed API
- While here, apply code formatting to the tests
This is done to force consumers to update to strongly-typed
InstanceKeys.
- cover all the constructors
- Start with some tests that fail, showing bugs in the implementation
- Fix bug that "derp@derp" was creating a valid instance-key with
a bad module and id (need to use ::fromString() to get that
functionality).
- Extend tests with more bad cases.
- Refactor tests to simplify "this is bad" assertions.
- Things in libcalamares/ subdirectories are namespaced
according to that subdirectory (sometimes in namespace
Calamares, sometimes CalamaresUtils). Do that in modulesystem/ too.
- Do the async GeoIP checking in the async requirements-checking phase
- Do not return any requirements results -- we just need the async bit
- Drop the waiting widget, since it's not needed (done by the
requirements phase)