Skip to content
Snippets Groups Projects
Commit d9aeb882 authored by Adriaan de Groot's avatar Adriaan de Groot
Browse files

[libcalamares] Add a clear() to GlobalStorage

While this isn't useful in production, it makes tests a lot
simpler to write since you don't have to wrestle with
creating new GS objects in order to start fresh.
parent f07e31de
No related branches found
No related tags found
No related merge requests found
......@@ -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
{
......
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment