From b44fd659868896d633a92f705aebad3d70552d59 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 25 Jan 2019 10:58:43 -0500 Subject: [PATCH] [libcalamares] load/save globals in YAML format --- src/libcalamares/GlobalStorage.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/libcalamares/GlobalStorage.h b/src/libcalamares/GlobalStorage.h index 72524ba4f..2c31a8f47 100644 --- a/src/libcalamares/GlobalStorage.h +++ b/src/libcalamares/GlobalStorage.h @@ -60,6 +60,7 @@ public: /// @brief dump keys and values to the debug log void debugDump() const; + /** @brief write as JSON to the given filename * * No tidying, sanitization, or censoring is done -- for instance, @@ -69,6 +70,15 @@ public: */ bool save( const QString& filename ); + /** @brief write as YAML to the given filename + * + * See also save(), above. + */ + bool saveYaml( const QString& filename ); + + /// @brief reads settings from the given filename + bool loadYaml( const QString& filename ); + signals: void changed();