Commit Graph

8708 Commits

Author SHA1 Message Date
Adriaan de Groot
9ae87b7fb7 [calamares] Change .desktop invocation
FIXES #1653
2021-03-14 15:56:22 +01:00
Calamares CI
d3a27f3c3c i18n: [python] Automatic merge of Transifex translations 2021-03-14 15:51:01 +01:00
Calamares CI
b30eaaddec i18n: [calamares] Automatic merge of Transifex translations 2021-03-14 15:51:01 +01:00
Adriaan de Groot
c767311062 Changes: pre-release housekeeping 2021-03-14 14:37:52 +01:00
Adriaan de Groot
9295c91128 Merge branch 'issue-942' into calamares
FIXES #942
2021-03-14 14:29:26 +01:00
Adriaan de Groot
caf18321df [users] Adjust UI to is-field-editable based on presets 2021-03-14 14:20:10 +01:00
Adriaan de Groot
7bae625f46 [users] Pick up UI changes based on the values from Config 2021-03-14 14:14:29 +01:00
Adriaan de Groot
b4a21d7aca [libcalamares] Add macro CONFIG_PREVENT_EDITING to handle uneditable fields
Boilerplate code for avoiding accidental setting of an internal
field when the UI is editable and the underlying data isn't.
2021-03-14 13:30:26 +01:00
Adriaan de Groot
3ea796d009 [users] 'undo' changes to values if the UI is wonky
- 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.
2021-03-14 12:27:59 +01:00
Adriaan de Groot
9fcf9b5fa8 [users] Pick up values from Config object on startup
- Previously, we 'knew' that the values in Config were empty,
  so didn't have to set them from the Config when building
  the (widget) page
2021-03-14 12:14:33 +01:00
Adriaan de Groot
941cc9c48b [users] Match presets to the actual name of fields 2021-03-14 12:14:33 +01:00
Adriaan de Groot
2e90a8d829 [libcalamares] Report preset mis-configurations
- warn about fields applied twice (program error)
- warn about fields not used (configuration error)
- add operator<< for "clean" looking preset application
2021-03-14 12:14:33 +01:00
Adriaan de Groot
d8dff3dc65 [libcalamares] Replace loadPresets() with an applicative style
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.
2021-03-14 12:14:33 +01:00
Adriaan de Groot
8b10a9cfc2 [libcalamares] Add isEditable() check
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.
2021-03-14 12:14:33 +01:00
Adriaan de Groot
448e478b6d [users] Use base Config and its Preset-handling 2021-03-12 13:54:06 +01:00
Adriaan de Groot
0be5e04c2e [libcalamares] Add a base class for Config-objects
This is an optional (until 3.3) base class, which can handle
Presets consistently for configurations.
2021-03-12 13:49:37 +01:00
Adriaan de Groot
381a4f9b53 [users] Add preset to users module Config 2021-03-12 13:25:16 +01:00
Adriaan de Groot
d9f2f5e988 [libcalamares] Start a 'presets' configuration datastructure 2021-03-12 13:16:36 +01:00
Adriaan de Groot
63fc1ecca3 Changes: document intention of this branch 2021-03-12 13:10:48 +01:00
Adriaan de Groot
cb67c79203
Merge pull request #1651 from demmm/calamares
[finishedq] add license for svg file
2021-03-09 20:35:22 +01:00
demmm
a7b46a02eb [finishedq] add license for svg file 2021-03-09 19:45:32 +01:00
Adriaan de Groot
98524708cc [partition] Chase namespace change for Units 2021-03-09 19:45:12 +01:00
Adriaan de Groot
9f17d3fd12 [libcalamaresui] Paste the last 16KiB of the log file
- If Calamares is run more than once, reading the log file
  can get you older / not relevant log messages. Get the tail
  end instead.
2021-03-09 18:25:10 +01:00
Adriaan de Groot
980e5e13f8 Merge branch 'fixup-log-upload' into calamares 2021-03-09 18:22:51 +01:00
Adriaan de Groot
ea63f48c31 [libcalamares] Put the units in a nested namespace
- this makes it much easier to use the literal suffixes
  by using the namespace rather than individual operators.
2021-03-09 18:21:58 +01:00
Adriaan de Groot
a1ed303820 [libcalamaresui] Add test for Paste
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.
2021-03-09 17:55:10 +01:00
Adriaan de Groot
44ec8a7c0b [libcalamaresui] Improve testability
- 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.
2021-03-09 17:22:48 +01:00
Adriaan de Groot
846d6abaa8 [libcalamaresui] Move message- and clipboard handling
- 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
2021-03-09 15:51:24 +01:00
Adriaan de Groot
81badc36f4 [libcalamaresui] Implement abstract doLogUpload() API
This is a "do the right thing" function, which then calls
the implementation-specific code for each type.
2021-03-09 15:42:21 +01:00
Adriaan de Groot
1ff854f05d [libcalamaresui] Push upload to a more abstract API
- 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
2021-03-09 15:32:46 +01:00
Adriaan de Groot
efec12d001 [libcalamares] Read structured upload-server info
- 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.
2021-03-09 15:24:02 +01:00
Adriaan de Groot
bce6f3f1b7 [libcalamaresui] Adjust paste code to desired API
Still doesn't compile because consumers are not ready.
2021-03-09 14:56:37 +01:00
Adriaan de Groot
3c6683bd98 [libcalamaresui] Rip out untyped data about upload server
This doesn't compile, but indicates the **type** information
desired about the (a) upload server.
2021-03-09 14:51:59 +01:00
Adriaan de Groot
f72436aa0a [libcalamaresui] Drop RE-wrangling, compare hosts instead to detect valid paste URL 2021-03-09 14:41:58 +01:00
Adriaan de Groot
8af5fb5da5 [libcalamaresui] Simplify getting URL response
- 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.
2021-03-09 14:38:43 +01:00
Adriaan de Groot
1bf95eacb0 [libcalamaresui] Tidy the logging some more 2021-03-09 14:33:47 +01:00
Adriaan de Groot
260862fabc [libcalamaresui] Move the format-string closer to where it is used 2021-03-09 14:31:46 +01:00
Adriaan de Groot
844831751d [libcalamaresui] Factor out the reading of the log file
- this will be needed for other pastebins, too
2021-03-09 14:30:20 +01:00
Adriaan de Groot
92e36558fa [libcalamaresui] Remove unnecessary shadowing in lambda 2021-03-09 14:25:40 +01:00
Adriaan de Groot
bc2435eb7d [libcalamaresui] Apply coding style 2021-03-09 14:23:52 +01:00
Adriaan de Groot
fc8830ae4a [libcalamaresui] Tidy logging 2021-03-09 14:23:27 +01:00
Adriaan de Groot
9154228421 Changes: adjust description of pastebin 2021-03-09 14:22:13 +01:00
Adriaan de Groot
1ebb807624 [calamares] Drop #warning about KDSAG
- 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.
2021-03-09 13:57:21 +01:00
Adriaan de Groot
430b3b0722 REUSE: tag the schema file (badly, missing an email address) 2021-03-09 13:55:20 +01:00
Adriaan de Groot
5349e03ea9 REUSE: the CI actions are uninteresting 2021-03-09 13:52:13 +01:00
Adriaan de Groot
0b8ef49e7e [calamares] Make debug-window available to QML
- 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)
2021-03-06 23:11:41 +01:00
Adriaan de Groot
c00a382aea [calamares] Refactor debug-window handling
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.
2021-03-06 22:55:48 +01:00
Adriaan de Groot
992c673951 [calamares] Document how to hide the Quit button
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).
2021-03-06 22:08:35 +01:00
Adriaan de Groot
44602d0237 [finishedq] CMake: missing keyword 2021-03-06 15:33:15 +01:00
Adriaan de Groot
83e6476be8 [finishedq] Tighten up requirements 2021-03-06 15:23:23 +01:00