Don't compare the old property value to the new one. Just set it
authorMohammed Sameer <msameer@foolab.org>
Sun, 2 Sep 2012 09:29:59 +0000 (12:29 +0300)
committerMohammed Sameer <msameer@foolab.org>
Thu, 6 Sep 2012 16:10:10 +0000 (19:10 +0300)
lib/qtcamcapability_p.h

index 441e280..b060ef3 100644 (file)
@@ -58,18 +58,10 @@ public:
   }
 
   bool setIntValue(int val) {
-    int old = 0;
-
     if (!src) {
       return false;
     }
 
-    intValue(&old);
-
-    if (old == val) {
-      return true;
-    }
-
     g_object_set(src, prop.toAscii().data(), val, NULL);
 
     return true;
@@ -86,18 +78,10 @@ public:
   }
 
   bool setFloatValue(qreal val) {
-    qreal old = 0;
-
     if (!src) {
       return false;
     }
 
-    floatValue(&old);
-
-    if (qFuzzyCompare(old, val)) {
-      return true;
-    }
-
     g_object_set(src, prop.toAscii().data(), val, NULL);
 
     return true;