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