summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-12-30 10:58:26 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-12-30 10:58:26 +0100
commiteaeb86205a04a2159de3e55fb7105195962249db (patch)
tree7a616fbb12aa1fb5547f2def3efdb7d484c88cc8 /facetracknoir
parent9cb243cc74d953283b0a233e47f1d0a4e303ab55 (diff)
don't mark as dirty by accident
Diffstat (limited to 'facetracknoir')
-rw-r--r--facetracknoir/options.hpp13
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)
{