From 8f6d08d23e9c3cba43d0d1891b81ad78816be7be Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 6 Jun 2017 05:46:12 -0400 Subject: [PATCH] Logging: add a global storage dump method --- src/libcalamares/GlobalStorage.cpp | 11 +++++++++++ src/libcalamares/GlobalStorage.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/src/libcalamares/GlobalStorage.cpp b/src/libcalamares/GlobalStorage.cpp index 5cef6f931..1ade3d3bc 100644 --- a/src/libcalamares/GlobalStorage.cpp +++ b/src/libcalamares/GlobalStorage.cpp @@ -18,6 +18,8 @@ #include "GlobalStorage.h" +#include "utils/Logger.h" + #ifdef WITH_PYTHON #include "PythonHelper.h" @@ -80,6 +82,15 @@ GlobalStorage::value( const QString& key ) const return m.value( key ); } +void +GlobalStorage::debugDump() const +{ + for ( auto it = m.cbegin(); it != m.cend(); ++it ) + { + cDebug() << it.key() << '\t' << it.value(); + } +} + } // namespace Calamares #ifdef WITH_PYTHON diff --git a/src/libcalamares/GlobalStorage.h b/src/libcalamares/GlobalStorage.h index 20af3978c..301800adc 100644 --- a/src/libcalamares/GlobalStorage.h +++ b/src/libcalamares/GlobalStorage.h @@ -57,6 +57,8 @@ public: int remove( const QString& key ); QVariant value( const QString& key ) const; + void debugDump() const; + signals: void changed();