diff --git a/src/libcalamares/GlobalStorage.cpp b/src/libcalamares/GlobalStorage.cpp index 519b1d0d6..a31a89b21 100644 --- a/src/libcalamares/GlobalStorage.cpp +++ b/src/libcalamares/GlobalStorage.cpp @@ -94,7 +94,7 @@ GlobalStorage::debugDump() const } bool -GlobalStorage::save( const QString& filename ) +GlobalStorage::saveJson( const QString& filename ) const { QFile f( filename ); if ( !f.open( QFile::WriteOnly ) ) @@ -108,7 +108,7 @@ GlobalStorage::save( const QString& filename ) } bool -GlobalStorage::load( const QString& filename ) +GlobalStorage::loadJson( const QString& filename ) { QFile f( filename ); if ( !f.open( QFile::ReadOnly ) ) @@ -139,7 +139,7 @@ GlobalStorage::load( const QString& filename ) } bool -GlobalStorage::saveYaml( const QString& filename ) +GlobalStorage::saveYaml( const QString& filename ) const { return CalamaresUtils::saveYaml( filename, m ); } diff --git a/src/libcalamares/GlobalStorage.h b/src/libcalamares/GlobalStorage.h index 782d443d4..14d5d41e9 100644 --- a/src/libcalamares/GlobalStorage.h +++ b/src/libcalamares/GlobalStorage.h @@ -94,7 +94,7 @@ public: * and this JSON file will contain that password in-the-only-slightly- * obscured form. */ - bool save( const QString& filename ); + bool saveJson( const QString& filename ) const; /** @brief Adds the keys from the given JSON file * @@ -103,13 +103,13 @@ public: * the global storage. The storage is not cleared first: existing * keys will remain; keys that also occur in the JSON file are overwritten. */ - bool load( const QString& filename ); + bool loadJson( const QString& filename ); /** @brief write as YAML to the given filename * * See also save(), above. */ - bool saveYaml( const QString& filename ); + bool saveYaml( const QString& filename ) const; /** @brief reads settings from the given filename * diff --git a/src/modules/preservefiles/PreserveFiles.cpp b/src/modules/preservefiles/PreserveFiles.cpp index 8352e861d..7262630e0 100644 --- a/src/modules/preservefiles/PreserveFiles.cpp +++ b/src/modules/preservefiles/PreserveFiles.cpp @@ -138,7 +138,7 @@ PreserveFiles::exec() } if ( it.type == ItemType::Config ) { - if ( Calamares::JobQueue::instance()->globalStorage()->save( dest ) ) + if ( Calamares::JobQueue::instance()->globalStorage()->saveJson( dest ) ) { cWarning() << "Could not write config for" << dest; }