- Make all four DEBUG_ flags actual CMake options, rather than
stuffing some of them in the rather-peculiar _enable_debug_flags.
Each debug option turns on suitable compile flags in the module(s)
that are affected.
- When writing YAML, given a float **always** write
some decimal digits (e.g. "1.0" rather than "1")
so that the type of the written-out thing stays
float.
- Avoids test failure with the sample `welcome.conf`
file which reads 1.0 and would write out 1, which then
led to type differences.
- Handle qlonglong explicitly
- Add a fallbackfor things that convert to qulonglong, to
avoid these remaining integer types from hitting the
very end of the if-chain, and being written out as
the **string** "<typename>"
When one of these common names for the netinstall page is used,
it gets pulled out of the standard translations, so that it
doesn't have to be translated in the per-distro config file.
These labels are common enough that they make sense for
everyone to have lying around.
FIXES#1367
(I say "fixed" but of course it's going to depend on the translation
workflow to make these available)
- In production, cDebug() might not show up, so the log will not
contain the lines saying what program is being run;
- Errors should at least mention the program name, but "env" or
"chroot" is not useful, so pull that from *args*, which is
the command we actually want to run.
- an empty command isn't going to work (although it might successfully
run chroot or env in the target system, that's not useful)
- while here, move variable declarations closer to their use.
- Slice overall progress into chunks, with each chunk of equal size
(as long as we have no overall count information) and place
the progress of the current chunk into its own slice.
- The entry knows where it should be mounted, and can remember that
- mount_entry() didn't use self, so made no sense as a method
of the Operation class
probably due to dynamically loading items
regionModel now lists, zonesModel only lists one delegate, but
working on QML modules can now continue without crashing cala
This doesn't actually **work** though, the QML uses older Calamares-internal
APIs and uses a ResponsiveBase that we don't have. Merge it mostly for
the Config and model changes.
FIXES#1355
- Add some extra checks for validity of m_currentStep (an index)
- Start off with explicitly invalid index, and keep it so until
loading is complete; this prevents the situation where quit-at-end
gets triggered after loading the very first module.
- io.calamares.modules doesn't exist
- ResponsiveBase doesn't exist
The module is now non-functional, but at least it loads and renders
a list of regions and zones.
- name default / example QML conventionally
- copy QRC from keyboard -- the QML needs to be included in the QRC --
since we don't want to have the QML in the keyboard module.
- follow branding settings, taking the panel-sides into account
- drop fixed width and height for QML parts
- give panels a minimum appropriate-dimension if they don't have one
This allows, for instance, putting both Widget sidebar and QML navigation
on the left-hand side of the window.
- Introduce an enum for panel-side
- Expose this to QML -- I can imagine that QML panels need to know
which side of the Calamares window they're on.
- Refactor loading the setting into a method that handles both
flavor and side
- There's no real reason to force the sidebar left and nav at the bottom,
certainly with QML supporting more layouts and being more flexible,
so document a mechanism to place the sidebar and navigation along
"edges" of the Calamares window.
- With an empty list, the question is meaningless
- .. and we called this with an empty list while constructing the
ViewManager; if quit-at-end is true, then this would terminate
Calamares immediately because the list was at the end.
- put signals in conventional place
- remove const int& parameter, that can just be int
- drop oddly-guarded code (that leaks memory); if the index (row)
being passed in, it's probably best to just crash
- remove unused signal warningMessageChanged
- Now the back button should be done by clients as well
- Refactor in CalamaresWindow to avoid leaking local button pointers
to surrounding code.
- Add macro UPDATE_BUTTON_PROPERTY for convenience in ViewManager
(ugh, macro) to change a value and emit corresponding update signal.
- add properties for the next button (enabled, label, icon...)
- update those properties as normal
- connect to the properties in the UI implementation
using Loader, can be reused for other widgets conversion
leave onClick example with full path, commneted out
title text for About is hardcoded, discuss option to make this configurable in welcome.conf
background color hardcoded, tested to work well in dark themes too
- since we've got two blocks of code copy-pasted, which both
decide to call one or the other of two member functions based
on a flavor value, turn that into a templated function.
- passing member functions looks a bit weird, and calling them
is syntactically surprising, but it cuts down the code a lot.
- the checker only collects and calls requirements; it has no
UI component, and only manages data (and a thread to do the
checking). Move it out of the UI library.
- this function lives in Module -- and is the only thing typing
Module to the ViewSteps and JobTypes. Split it out into its
own funciton. Nothing else in Module needs to befriend the
ViewSteps, so we move the friend declaration around a bit
as well.
- while here, apply coding style.
This is prep-work for moving module to libcalamares.
- drop the current and completed roles, and expose only
the currentIndex. QML can use the QObject property on
the model, while QWidgets can call internally through
the model's data() function.
- we don't need to provide role names for this, so drop that bit.
- simplify the delegate code while here.
- Groups inherit slightly differently: if a subgroup **explicitly**
configures criticalness, use that. It would be weird, but possibly,
to have a non-critical subgroup of a critical group.
- An unselected group with (some) selected subgroups was not
displayed as (semi)checked -- it was unchecked, because
its checked-ness was not updated based on the children.
- the `parent` when installing a translator was not used, so drop it
from the API. Chase some uses of the API, but leave welcome-modules
broken: there's a merge of those coming.
- isEfi only used meaningfully once
- if (isEfi) followed by if (!isEfi) can be simpler
- create bios-but-not-GPT strings in one go
- mark TODO that this should warn only if needed
- use weird * notation for branding-strings
- In some cases, it makes sense to close Calamares automatically
when it is done. Set *quit-at-end* to do so -- although this
probably also means you should remove the *finished* page.
- It's annoying to have 100% progress reported (from the processing
of list items) and then have another 3 seconds delay.
Unrelated to the issue-at-hand, but spotted in testing.
- while the queue is executing (the thread is running jobs) the
isRunning() method returns true.
- re-work some internals to reset isRunning() before emitting
finished() signal.
- Instead of loading all in the constructor, provide a public
setupModelData().
- This allows creating the model and setting it for UI, before
the load completes.
- Add initial definition of Config object, which will extract the model-
setting and loading code from the page, and which is also prep-work
for a QML version of this module.
- While here, remove superfluous code
- For a static list of selectable packages (e.g. what you might otherwise
use file:/// for with a static file on the ISO) you can now stick the
list in the config file itself, simplifying some setups.
- Also saves faffing about with network.
SEE #1319
- `local` is supposed to read from the config-file, rather than
externally; this simplifies examples, makes it easier to have
multiple netinstalls, and condenses the documentation.
- Check groups
- Check whole treemodels recursively (this is not in PackageTreeItem,
because that explicitly ignores the tree structure).
- Also a stub of checking example files (from the src dir)
- Just some simple tests for the Items
- Test creation of package group from variant
- This needs Qt5::Gui to link because QStandardItem is a GUI class,
although we can run the tests without a GUI.
- This doesn't compile right now.
- The nested class ItemData doesn't do anything useful or
meaningful that having model items with the right data wouldn't.
- If we're converting a YAML map to a QVariant (Map), may as well
express that in the types. This makes the return from, say,
`yamlMapToVariant()` cheaper, but incurs conversion in
`yamlToVariant()` .. previously the place for costs was
swapped around.
- For those cases that want-and-expect a Map, or List, this makes
the calls slightly cheaper. For the generic case, the costs move
around internally.
Pull in the instance-weight changes and type-improvements,
but not the part where special-casing of unsquash is dropped:
weights are still per-job, not per-module.
- can't convert lambda-with-captures to a function pointer (Clang 9)
- instead, use a context property .. QmlViewStep already sets a
"config" property with the Config object, but WelcomeQ wants it
as another name as well.
- this avoids registering the Welcome object across all QML pages,
as well.
NOTE: needs to have the QML adjusted for this change.
- Replace a map-of-strings with a class type.
- For now, doesn't compile.
- Intention is to construct from a YAML / QVariant from the
*instances* list in `settings.conf`.
- Refactor into a support method and two API points
- Use std::transform for doing-things-to-a-list
- Add searchQmlFile that only takes a name, for
non-modules to use.
- Registration of QML modules may need to be done
for more parts of Calamares. Move into the library,
out of the model.
- Register for QML when using the QML sidebar.