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