Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/hyperion/SettingsManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SettingsManager : public QObject
/// @brief get the full settings object of this instance (with global settings)
/// @return The requested json
///
const QJsonObject & getSettings() const { return _qconfig; }
QJsonObject getSettings() const;

signals:
///
Expand Down
11 changes: 11 additions & 0 deletions libsrc/hyperion/SettingsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,17 @@ QJsonDocument SettingsManager::getSetting(settings::type type) const
return _sTable->getSettingsRecord(settings::typeToString(type));
}

QJsonObject SettingsManager::getSettings() const
{
QJsonObject config;
for(const auto & key : _qconfig.keys())
{
//Read all records from database to ensure that global settings are read across instances
config.insert(key, _sTable->getSettingsRecord(key).object());
}
return config;
}

bool SettingsManager::saveSettings(QJsonObject config, bool correct)
{
// optional data upgrades e.g. imported legacy/older configs
Expand Down