Move qt_cam_copy_register to QtCamera
[harmattan/cameraplus] / lib / qtcampropertysetter.cpp
index 7d21e69..29db83d 100644 (file)
@@ -1,7 +1,7 @@
 /*!
  * This file is part of CameraPlus.
  *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -23,7 +23,7 @@
 #include <QSettings>
 #include <QDebug>
 
-#define PROPERTIES_FILE                       "/etc/qtcamera/properties.ini"
+#define PROPERTIES_FILE                       DATA_DIR"/properties.ini"
 
 class QtCamPropertySetterPrivate {
 public:
@@ -54,17 +54,19 @@ public:
 
        gst_object_unref(elem);
        break;
+
       case GST_ITERATOR_RESYNC:
        gst_iterator_resync(iter);
        break;
+
       case GST_ITERATOR_ERROR:
-       done = TRUE;
-       break;
       case GST_ITERATOR_DONE:
-       done = TRUE;
+       done = true;
        break;
       }
     }
+
+    gst_iterator_free(iter);
   }
 
   void setProperties(GstElement *element) {