calamares/src
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
..
branding Branding: shuffle around a bit, expand documentation 2020-06-24 04:53:22 -04:00
calamares [calamares] Tweak default QML sidebar 2020-07-07 16:11:18 +02:00
libcalamares [libcalamares] Minor documentation on Yaml.* 2020-07-09 10:45:28 +02:00
libcalamaresui [libcalamaresui] Fix slideshowAPI loading 2020-07-09 11:28:09 +02:00
modules [netinstall] auto-resize the columns 2020-07-08 13:34:38 +02:00
qml [qml] Update SPDX identifiers. 2020-06-03 12:28:58 +01:00
CMakeLists.txt CMake: new convenience module CalamaresAddTest 2020-02-17 12:02:53 +01:00