More fixes for Qt5
[harmattan/cameraplus] / declarative / cameraconfig.cpp
index b247d62..1c1678a 100644 (file)
 
 #include "cameraconfig.h"
 #include "qtcamconfig.h"
+#if defined(QT4)
 #include <QDeclarativeInfo>
+#elif defined(QT5)
+#include <QQmlInfo>
+#endif
 
 CameraConfig::CameraConfig(QObject *parent) :
   QObject(parent),
@@ -59,6 +63,10 @@ void CameraConfig::classBegin() {
 }
 
 void CameraConfig::componentComplete() {
+  if (m_config) {
+    return;
+  }
+
   if (m_path.isEmpty()) {
     m_config = new QtCamConfig(this);
   }