In particular, we need a separate Job class to set the label; this
is invoked after we formatted a partition, and when no other changes
to the partition have been requested in the Edit dialog.
The partition- and filesystem-label setting code was already there,
but not in the call to createNewPartition(); now we set the
FS label twice (once in the call, once afterwards)
When creating or editing a new formatted partition, allow
to set a filesystem label (16 chars maximum). Modify
the KPMHelpers to accept it as a new parameter. Partitions
created by default may get a meaningful label too.
The partitioning header 'FileSystem.h' is for KPMCore support;
it is already included by Global.h and guarded by ifdefs for
KPMCore. Do not unconditionally include it from the implementation.
- make the functies that take a GS* first-class
- use the convenience functions from JobQueue for the others
- inline so only the explicit-GS* functions are in the library
The skip-checking is now in the functions for adding plugins and
subdirectories, so that third-party building should get it
as well, for free. Since AddModuleSubdirectory and AddPlugin
use the newly split-out module, handling SKIP_MODULES and USE_*
consistently across module repositories is now easier.
While here, make accumulating-the-skipped-modules explicit.
- offer a convenience method for showing a popup and
URL information and copying the URL to the clipboard
- use that from ViewManager (on failure) and DebugWindow (on demand)
- make the tools tab buttons along the bottom row
- show the global storage tab by default
This costs little screen real-estate, makes the tools much more
visible and useful.
- use load() to start loading
- the FetchNextUnless class is useful in more spots in
the loading process
- set status explicitly on success (otherwise, a failure in a
previous URL would leave a failure message lying around even
when the module shows something useful)
- m_queue was not initialized to nullptr, crashes
- split queue-is-done to a separate slot rather than a lambda
- prefer queueing calls to fetchNext(), for responsiveness
Require a ; after RETRANSLATE macros. They are statement-like;
this makes it easier for some of them to be recognized by
clang-format and resolves some existing weird formatting.
Now all the business logic is in Config, the door is open to
building a QML-ified netinstall module. I'm not sure that
would be worth it: packagechooser offers more space for a
nice UI and should be QML'ed first.
- do some additions and check they work
- drop the ";add" annotation on the source, this is not
needed in the current situation with only adds available.
For methods that log a bunch of things, and which want to
consistently use SubEntry, but don't know when the **first**
log entry is within the method, Logger::Once can be used
to log one regular message (with function info) and the
rest are subentries.
- If the module knows about a preset, then it should be registered
even if there is not a value set for it specifically; this avoids
complaints from isEditable() for fields that are known, but
do not have a preset. (Reported by Anke)
There was a mix of autologin and autoLogin, leading to confusion
in the code. QML is sensitive to this, so go to one consistent name.
(Although the names of the settings in the `.conf` file are
different again)
- this test would fail if the logfile already exists for
any reason (including "I just ran the test")
- remove the file before expecting an empty logfile
- improve messages; a missing logfile is not a "things cannot
work" situation, it's a warning
Although the example configurations shouldn't really be used
as a sample of how to configure **your** Calamares for your
distro, many distro's do just copy the examples. So leave
traces of the OEM-configuration settings in the example,
and give the standard configuration a 'nothing changed'
set of presets.
- you can still call set*(), eg. from the UI, when the field is
not editable. Although the code previously ignored the change,
this would lead to a mismatch between what the UI is showing
(the changed value) and what the Config has (old value).
Emit a changed-signal (notify) with the old value so that the
UI is changed *back* as soon as possible.
- warn about fields applied twice (program error)
- warn about fields not used (configuration error)
- add operator<< for "clean" looking preset application
Build up the list of known presets by what the Config-object
expects, not by what the Config file provides. This allows
early detection of mis-matched configurations.
Presets can only apply to Q_PROPERTY properties, and the
preset must match the property name.
This adds support for checking whether a field is editable;
Config objects should reject changes if the field is not
editable. There is an "unlock" setting to override the
check, although this is currently always locked.
This tests only the termbin ("fiche") paste by sending it
a derpy fixed string. Prints the resulting URL, doesn't
verify in particular.
It'd be rude to run this test too often.
- mark functions with STATICTEST so they can be compiled into a test
- move logfile-reading so we can call the pastebin-upload functions
with an arbitrary payload.
- The Paste API promises just a (string) URL back, not
a whole message, so return just the URL from the
abstract API and the concrete (fiche) implementation.
- Set clipboard contents from the UI
- Build (translated) message in the UI code
- have a namespace Paste with just one entry point, which will handle
untangling type &c.
This doesn't compile, but indicates the direction to take the API
- Use just type and url, since port can be specified in
a URL. Note that we only use host and port, not the
scheme (or the path, for that matter).
- Factor out understanding the *uploadServer* key to a function.
- get a QByteArray rather than going through a char[] buffer
- bytes-read is not important since the RE can only match if
there **are** that many characters.
- it might not be very current, and it's *probably* better to
use dbus-activation / kf5dbus, but let's not call it
deprecated until very sure that the dbus version does the
right thing.
- Add a toggle() to the debug-window manager, for convenience
- Make the manager available to QML
- Use the debug-window manager (code imported from KaOS)
Move the management of the (a?) DebugWindow to a separate
class, and hang on to that manager in CalamaresWindow.
This is prep-work towards making it available from QML as well.
The Quit button can have its own logic at a QML level for
show/hide. It **ought** to follow the *quitVisible* property,
but can do additional work. Here, document how a distro might
choose to hide the Quit button on the last page (generally,
that's the "finished" page).
It's possible to ignore the "user setting" for restart-now
and call doRestart(true) directly. This is intended for
use with specific UIs that make that choice clear for the user.
Hook up both [finished] and [finishedq] to the "traditional"
restart-if-the-box-is-ticked logic although the example
QML doesn't expose that box.
- Add function for mapping panel sides to an orientation (H/V)
- Pass that into the creation functions
This is prep-work for handling vertical navigation and horizontal
progress reporting cleanly.
- using the QML sidebar would not highlight the first step on startup,
only after next / prev would the highlight show up. Now, notify
when all the modules are loaded (and number 0 is active).
module builds & runs, config connections are not registering
no errors
finishedq.qml is offering a different option though, running commands directly in qml
plasma-framework executer is used for that
- move most of the business logic to Config
- make retranslate of the page more robust (e.g. changing language
after failure would restore the un-failed message)
There's still some bits left.
*If* the distro has GeoIP enabled and auto-selects the language for
Calamares, then Belarus now selects Russian, rather the Belarusian.
This is based on some personal input, mostly, and Wikipedia census data.
FIXES#1634
- the configuration is still duplicated in the widget, and
functionality still needs to move to the Config object
- the ViewStep is cut down to almost nothing
- the host system's /etc/group is being read, and that varies between
host OS versions; since I was doing today's release on KaOS, the
test was failing because of arbitrary differences between the
default groups on each Linux flavor.
FIXES#1604
(Admittedly, this fixes the problem only when there's Plasma Solid automount
present, and not any of the other kinds; but none of those have been reported
yet, and adding them into AutoMount.cpp is opaque to the rest of the
system)
- It shouldn't be necessary to explicitly .get() pointers for
logging, and it's convenient to know when a pointer is smart.
* no annotation means raw (e.g. @0x0)
* S means shared
* U means unique
- switch logging in job to VERBOSE because we don't want to be printing
pointers to the regular session log
- switch logging in test to VERBOSE to actually see the messages from the Job
- hook the test into the build
The popup now cuts down messages to a manageable length.
Hopefully the part that is preserved, will still show
something meaningful for the user (8 lines of text should
be sufficient for the kind of things we do).
FIXES#1613
- Although unique_ptr is only used when ICU is enabled, include it
always because it is likely that we'll use more unique_ptr
in the implementation at some point.
Ever since signed shim binaries for multiple architectures became
available, the shim binaries installed in Linux distributions have
been renamed to include the EFI architecture in the binary names.
This started in Fedora, but is now used in openSUSE and Ubuntu too.
Reference for shim binary names comes from shim spec in Fedora:
d8c3c8e392/f/shim.spec (_23-32)
- 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.
The value inside a unique_ptr can't be opaque, it needs to be known
at any site where the pointer may be deleted. shared_ptr does not
have that (deletion is part of the shared_ptr object, which is larger
than the unique_ptr) and so can be used for opaque deletions.