- Some minor bits snuck in with the string-truncation code
- While here, make UPDATE_BUTTON_PROPERTY more statement-like
so it doesn't confuse code-formatters.
Writing `Logger::NoQuote{}`` has annoyed me for a while, so
switch it to a constant, like SubEntry, so it looks more
like a regular manipulator object.
This improves the situation for jobs that do not provide
a status: their blank status does not overwrite the status
bar, and since (previous commit) the description or name
is used to start the job if the status is empty, at least
**something** is displayed.
SEE #1528
- parameter instanceKey was left over from previous work that
special-cased the weight of Python modules.
- while here, consistently do `~T() override`
With 1 CPU, Calamares still spawns 9 threads or so: eventloop,
dbus loop, QML loop, ... many of those are invisible to the
application. Contention occurs on startup when the UI is constructed,
and we end up with the module manager creating widgets alongside,
or ahead of, the main window UI. This can result in deadlock:
- in CalamaresApplication::initViewSteps
- in QML imports
This is partly because the signal-slots connections get "deep":
from loadModules() we emit *modulesLoaded* which ends up showing
the main window in initViewSteps(). Avoid this with a QTimer:
drop back to the event loop and release whatever locks are held,
so the QML thread can get on with it already. Then the timer
goes off and the view steps are created.
- point to main Calamares site in the 'part of' headers instead
of to github (this is the "this file is part of Calamares"
opening line for most files).
- remove boilerplate from all source files, CMake modules and completions,
this is the 3-paragraph summary of the GPL-3.0-or-later, which has
a meaning entirely covered by the SPDX tag.
- CC0-1.0 for the uninteresting version-headers
- GPL-3.0-or-later for the services
- add SPDX identifiers to Calamares C++ libraries and application sources
- add SPDX identifiers to Calamares QML (panels and slideshow)
- the `qmldir` is a list of names of things in the directory,
so CC0-1.0 it as "uninteresting"
- QRC files are lists of names of things in the directory,
so CC0-1.0 them as well
Some Calamares source files incorporate material from
3rd parties (unlike the 3rdparty/ dir, which is basically-
unchanged 3rd party source). Tidy up the FileCopyrightText
lines for those sources.
This is not an exhaustive effort.
The build instructions are not that interesting, it's a toss-up
between CC0 and BSD-2, but because other CMake bits are BSD-2-Clause,
apply that to more CMakeLists. The copyright date isn't all that
accurate, but these are just inconsequential files.
While here, tidy up and get rid of some useless intermediates.
- The weight is the module (instance) weight, which can be
- the default weight of 1
- the weight specified for the module (in module.desc / the module
descriptor; this defaults to 1, above)
- the weight specified for the instance (in settings.conf)
The last of these "wins"; weights are constrained to 1..100
The weight isn't actually used in progress computation yet.
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.
- 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.
- All the headers go to relevant subdirs, but we don't keep
libcalamares and libcalamaresui apart.
- While here, remove unused variable from libcalamares CMake
- link the library privately -- the public API uses QVariantMap
- install FindYAMLCPP just in case
- add yamlcpp explicitly in the few places that really need it
(e.g. netinstall testing the parsing of netinstall.yaml)
- Add the Calamares CMake-modules to the search path automatically
- Export to CalamaresTargets.cmake and use namespace Calamares::
- Document imported targets
- Find Qt, because the translations machinery will need macros from that
- The installed lib links to IMPORTED libraries from KF5, so we need
to find them (again) as well.
- When loading QML V2, both loadQmlV2Complete() and changeSlideShowState()
lock the same mutex, introduced in e7f4479df1.
- Explicitly unlock when loading is done and we need to change the state
immediately.
- For testing purposes, it's useful to load a module externally
and then register it to the ModuleManager (this hands off ownership).
- Refactor overall module loading to use the exposed single-module method.
- QML files need to be searched in specific places; this was initialized
by Calamares, but not for the text application. Move initialization
into the library.
- Previously, unless setDefaultFontSize() was called explicitly,
the default size would be 0, leading to unexpected and weird
displays (and a warning on stderr).
- If setDefaultFontSize() is not called, get a sensible size instead
(like defaultFontHeight() was already trying to do).
- It is the requirements model (checking) that reports progress, and now
the model is accessible (ask for it with requirementsModel(), make the
messages come from there.
- The architecture of letting someone build up a list of requirements
from data emitted by the ModuleManager is broken: if it gets loaded
later, it will miss data; passing around complicated objects is
no fun anyway. Get rid of it, on the way to "ModuleManager has
its own model of requirements".
- Give the ModuleManager a RequirementsModel -- that is the source
of truth about the module-requirements of the modules managed
by that particular ModuleManager.
- Let the RequirementsChecker operate on a given RequirementsModel.
Doesn't compile (but I need to get it off this machine)
- Prepare to implement a picture-based slideshow alongside QML
- Split QML loading into the slideshow component
This might be good prep-work for moving QML loading out of the QMLViewStep as well.
- This code has existed for a long time but never stored anything
to the Branding object, and the most literal slideshow (just some
images) was not implemented.
- This is a good example of being overly clever in C++
- the whole API with an enum requesting a specific string is a bit weird,
although it makes sense from the 'might need more strings specified'
point of view.
- rename enlarge to ensureSize() and change the meaning from
"make this much bigger" to "make sure this is displayed",
which is easier on the caller to calculate.