[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.
This commit is contained in:
parent
f07e31de29
commit
d9aeb88275
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user