Commit Graph

7541 Commits

Author SHA1 Message Date
Adriaan de Groot
e1f4224bed [libcalamaresui] Fix slideshowAPI loading
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.
2020-07-09 11:28:09 +02:00
Adriaan de Groot
a58d59d86c [libcalamares] Minor documentation on Yaml.* 2020-07-09 10:45:28 +02:00
Adriaan de Groot
da1cc7c3a5 [libcalamaresui] Don't clear the map when inserting strings
- the documentation doesn't say the map is cleared, and the one
  place this function is used doesn't need that either.
- make type of config explicit
2020-07-09 08:46:16 +02:00
Adriaan de Groot
a91edfef89 [netinstall] auto-resize the columns
- previously, the first column (name) was sized to show the
  names **that were visible at startup**, which fails when
  there are long names hidden in groups that are not expanded
  immediately.
- change the columns to resize according to the contents; this makes
  the descriptions jump to the right as the name column gets wider.

FIXES #1448
2020-07-08 13:34:38 +02:00
Adriaan de Groot
80cad17e97 Merge branch 'issue-1393' into calamares 2020-07-08 13:11:28 +02:00
Adriaan de Groot
240c703549 [partition] Don't leak the PM core object 2020-07-08 13:11:10 +02:00
Adriaan de Groot
7f1a59f02b [partition] Fix typo 2020-07-08 13:11:10 +02:00
Adriaan de Groot
313531bc4b [partition] Remove unused parameter
- there are no consumers for checking-the-capacity-of-the-drive

This parameter was introduced in 3cd18fd285 as "preparatory work"
but never completed. The architecture of the PartitionCoreModule
makes it very difficult to get the necessary parameters to
the right place, and it would probably be better to put
a SortFilterProxyModel in front of a partitioning model anyway.

Since the display code can already filter on size, just drop this one.
2020-07-08 13:08:51 +02:00
Adriaan de Groot
948c078e1a [partition] winnow floppy drives
- don't list floppy drives

FIXES #1393
2020-07-07 23:03:12 +02:00
Adriaan de Groot
a78c368367 [calamares] Tweak default QML sidebar
- make the rectangles slightly larger
- align text to center of the rectangle
- make the rectangle fill out the column; without this, the
  width would collapse back to 0 after a change in the model,
  which would draw 0-width rectangles.

FIXES #1453
2020-07-07 16:11:18 +02:00
Adriaan de Groot
2b2a69631f [libcalamaresui] Suggestions for better naming of enum values 2020-07-07 15:29:13 +02:00
Adriaan de Groot
3565b6806a [libcalamares] Massage the logger output
- continuations, for the console, no longer print the date + level,
  which makes things easier to visually group and read.
- the file log is mostly unchanged, except it contains more spaces now.
2020-07-07 15:25:25 +02:00
Adriaan de Groot
631923abf8 [libcalamares] Console-logging follows -D flag exactly
- Don't always log LOGEXTRA and below.
2020-07-07 15:12:50 +02:00
Adriaan de Groot
67aa34c4a4 [calamares] Center the progress texts 2020-07-07 14:13:49 +02:00
Adriaan de Groot
37ce49b001 CMake: stop overwriting branding settings in the build dir
- Only copy over branding files if they are newer

Typically I have KDevelop open while working on Calamares; if I
am editing settings in `branding.desc` in the build directory,
then every time KDevelop runs CMake in the background, my
changes (for testing branding things!) would be overwritten.
Don't do that.

For normal builds with a clean build directory, this doesn't change
anything since the target is missing; changing a file in the
source directory **will** copy it over the build directory version.
2020-07-07 14:11:16 +02:00
Adriaan de Groot
14fbfa72d3 Changes: new contributions 2020-07-07 13:48:21 +02:00
Adriaan de Groot
43ebcf8b61 [packages] Keep package-manager list alphabetized 2020-07-07 13:48:07 +02:00
Adriaan de Groot
a923db0289
Merge pull request #1441 from codesardine/calamares
[packages] add pamac support
2020-07-07 07:45:04 -04:00
Vitor Lopes
c16866fb88 pep8 302 2020-07-05 08:37:28 +01:00
Vitor Lopes
e29462bc05 [pamac] rework db_lock 2020-07-05 08:35:52 +01:00
Vitor Lopes
d78cbfc644 update example configurations and schema 2020-07-05 08:18:38 +01:00
Vitor Lopes
2c76106a66 Merge branch 'calamares' of https://github.com/calamares/calamares into calamares 2020-07-05 08:14:32 +01:00
Adriaan de Groot
46ad704ede [partition] Fix build for old KPMCore
SEE #1444
2020-07-03 22:33:00 +02:00
Adriaan de Groot
36a9088480
Merge pull request #1444 from gportay/add-parttype-partattrs-to-global-storage
[partition] Add the GPT type and attributes to global storage
2020-07-03 16:18:56 -04:00
Adriaan de Groot
0be6f63d2a
Merge pull request #1443 from gportay/add-default-value-to-variant-helpers
[libcalamares] Add default value to variant helpers
2020-07-03 16:12:34 -04:00
Adriaan de Groot
d3f9415bc1 [packages] Expand schema to cover the operations
- Not complete, since the items in the operations aren't done
2020-07-03 22:07:18 +02:00
Adriaan de Groot
8aa8ac2d26 [packages] Tidy up configuration
- fix the schema so the schema is valid json-schema
- the schema doesn't actually validate the *operations* yet
- sort the named backends (needs a double-check that the
  list covers all the ones we currently support)

SEE #1441
2020-07-03 21:51:39 +02:00
Adriaan de Groot
08aa362c5c [license] Warnings-reduction
- Don't do in code what is already done in the designer (.ui) file
- setFrameStyle() is difficult because it mixes different enums
  into an int, which causes the warning from clang.
2020-06-27 00:33:50 +02:00
Adriaan de Groot
3b5c4839e3 [libcalamaresui] Warnings-- 2020-06-26 20:34:33 +02:00
Adriaan de Groot
31a1b710bc Docs: say something about QML modules 2020-06-25 15:26:48 +02:00
Adriaan de Groot
6735ff1cd0 Docs: give up on PythonQt modules 2020-06-25 14:45:35 +02:00
Adriaan de Groot
fa2f91aa46 [libcalamaresui] Minor documentation improvements 2020-06-25 14:04:49 +02:00
Adriaan de Groot
3c48bbdb9c Merge branch 'issue-1446' into calamares
Improve margin handling.

There's a margin around the "central widget" in Calamares, which serves
to keep the contents away from window edges. This works for widgets,
which all have a content widget with a layout, but is a little weird for
QML components: the QML component probably has its own internal margins,
and the margin around it serves little purpose.

If there's panels (navigation, progress) around the central widget, the
margins also serve to keep the content away from those navigation
elements.

**But** if there are no panels, then a QML component still gets a margin
around it. Pretty much the only reason for a no-panel setup is that you
have a full-screen QML version of Calamares where the navigation is
"inside" each QML component. This could be the case in a customised OEM
tool built from Cala, for instance.

For this special case, improve overall margin handling by giving the
view steps some control over their own margins.

FIXES #1446
2020-06-25 00:00:41 +02:00
Adriaan de Groot
8ced67680d [calamares] Allow get/set of panel-sides
- 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.
2020-06-25 00:00:13 +02:00
Adriaan de Groot
68aecf6a26 [libcalamaresui] Special margins for QML view steps
If there are no surrounding panels, drop the margin around the QML on
the assumption it needs to be full screen under special circumstances.
2020-06-24 23:41:20 +02:00
Adriaan de Groot
d952faf909 [libcalamaresui] Set margins based on viewstep suggestion 2020-06-24 22:12:59 +02:00
Adriaan de Groot
d7ed450dbf [libcalamaresui] Give ViewManager data about side-panels 2020-06-24 21:41:06 +02:00
Adriaan de Groot
1648f311fe [libcalamaresui] apidox touch-up 2020-06-24 21:26:22 +02:00
Adriaan de Groot
748d76df4f [libcalamaresui] Add support for steps with own margins 2020-06-24 21:15:37 +02:00
Adriaan de Groot
347a25d13d [libcalamaresui] Avoid nullptr deref
- there's a check already there, and probably this means things are hopelessly
  broken anyway, but let's not crash here.
2020-06-24 20:48:06 +02:00
Adriaan de Groot
4a6ee39f8b [libcalamaresui] Blanket unmargin the content area 2020-06-24 11:08:31 +02:00
Adriaan de Groot
bfbb0f1c49 [libcalamaresui] Mark some TODO for 3.3, in passing 2020-06-24 04:59:19 -04:00
Adriaan de Groot
8a9e85db71 Branding: shuffle around a bit, expand documentation 2020-06-24 04:53:22 -04:00
Adriaan de Groot
a4f9ac9aea CI: update signing key
The signing key expired some time ago, and while I made a
new signing key, there's no indication that a different
key is being used. Update the ID for future signatures.
2020-06-23 17:17:45 +02:00
Adriaan de Groot
e113c8cc9b Changes: fixup announcement 2020-06-23 17:05:25 +02:00
Adriaan de Groot
e206eb086b [partition] Missing includes for Qt-compatibility 2020-06-23 17:05:08 +02:00
Adriaan de Groot
c3ff9edfa2 [tracking] Add a test executable
- just a stub, hardly tests useful functionality
2020-06-23 14:43:26 +02:00
Adriaan de Groot
3ee53435c5 [libcalamares] Fix constness issue (gcc reported) 2020-06-23 14:30:12 +02:00
Adriaan de Groot
1dfb25372b [tracking] Warnings-reduction
- Give classes a virtual destructor that need them
- Remove spurious ;
- Refactor addJobs() because that doesn't need to be in a class
- Remove redundant intermediate base-classes
2020-06-23 13:37:56 +02:00
Adriaan de Groot
0bede0692a [locale] Warnings-- on static_cast with no message 2020-06-23 13:18:30 +02:00