rename header files from *.h to *.hpp

This commit is contained in:
Rasmus Karlsson
2017-06-11 09:31:45 +02:00
parent 961f22819e
commit 1c6ff37e76
104 changed files with 327 additions and 326 deletions
+31
View File
@@ -0,0 +1,31 @@
#pragma once
#include "setting.hpp"
namespace chatterino {
struct SettingsSnapshot {
public:
SettingsSnapshot()
: _items()
{
}
void addItem(std::reference_wrapper<BaseSetting> setting, const QVariant &value)
{
_items.push_back(
std::pair<std::reference_wrapper<BaseSetting>, QVariant>(setting.get(), value));
}
void apply()
{
for (auto &item : _items) {
item.first.get().setVariant(item.second);
}
}
private:
std::vector<std::pair<std::reference_wrapper<BaseSetting>, QVariant>> _items;
};
} // namespace chatterino