Changelog for 0.0.8
[harmattan/cameraplus] / declarative / cameraconfig.cpp
index b247d62..169c34c 100644 (file)
 
 #include "cameraconfig.h"
 #include "qtcamconfig.h"
+#if defined(QT4)
 #include <QDeclarativeInfo>
+#elif defined(QT5)
+#include <QQmlInfo>
+#endif
+
+// TODO: share that with qtcamera. We now have 2 instances of QtCamConfig
 
 CameraConfig::CameraConfig(QObject *parent) :
   QObject(parent),
@@ -59,6 +65,10 @@ void CameraConfig::classBegin() {
 }
 
 void CameraConfig::componentComplete() {
+  if (m_config) {
+    return;
+  }
+
   if (m_path.isEmpty()) {
     m_config = new QtCamConfig(this);
   }