#pragma once #include "setting.hpp" namespace chatterino { struct SettingsSnapshot { public: SettingsSnapshot() { } void addItem(std::reference_wrapper setting, const QVariant &value) { _items.push_back( std::pair, QVariant>(setting.get(), value)); } void addMapItem(QString string, QPair pair) { QMap> map; _mapItems.insert(string, pair); } void apply() { for (auto &item : _items) { item.first.get().setVariant(item.second); } } QMap> _mapItems; private: std::vector, QVariant>> _items; }; } // namespace chatterino