diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-12-30 10:58:26 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-12-30 10:58:26 +0100 |
commit | eaeb86205a04a2159de3e55fb7105195962249db (patch) | |
tree | 7a616fbb12aa1fb5547f2def3efdb7d484c88cc8 /facetracknoir | |
parent | 9cb243cc74d953283b0a233e47f1d0a4e303ab55 (diff) |
don't mark as dirty by accident
Diffstat (limited to 'facetracknoir')
-rw-r--r-- | facetracknoir/options.hpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/facetracknoir/options.hpp b/facetracknoir/options.hpp index 16946e88..67c0958d 100644 --- a/facetracknoir/options.hpp +++ b/facetracknoir/options.hpp @@ -43,6 +43,12 @@ namespace options { return t.toDouble(); } + template<> + inline QVariant qcruft_to_t<QVariant>(const QVariant& t) + { + return t; + } + // snapshot of qsettings group at given time class group { private: @@ -115,8 +121,11 @@ namespace options { } void store(const QString& name, const QVariant& datum) { - modified = true; - transient.put(name, datum); + if (!transient.contains(name) || datum != transient.get<QVariant>(name)) + { + modified = true; + transient.put(name, datum); + } } bool contains(const QString& name) { |