diff --git a/src/libcalamares/GlobalStorage.cpp b/src/libcalamares/GlobalStorage.cpp index 717b8fff7..0c78201d3 100644 --- a/src/libcalamares/GlobalStorage.cpp +++ b/src/libcalamares/GlobalStorage.cpp @@ -88,6 +88,13 @@ GlobalStorage::remove( const QString& key ) return nItems; } +void +GlobalStorage::clear() +{ + WriteLock l( this ); + m.clear(); +} + QVariant GlobalStorage::value( const QString& key ) const { diff --git a/src/libcalamares/GlobalStorage.h b/src/libcalamares/GlobalStorage.h index a0a1940f2..da17243d3 100644 --- a/src/libcalamares/GlobalStorage.h +++ b/src/libcalamares/GlobalStorage.h @@ -70,6 +70,9 @@ public: */ int remove( const QString& key ); + /// @brief Clears all keys in this GS object + void clear(); + /** @brief dump keys and values to the debug log * * All the keys and their values are written to the debug log.