Don't forget to call base class implementation
[harmattan/cameraplus] / declarative / cameraconfig.cpp
index 6085ed5..61ac943 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),
@@ -55,10 +61,22 @@ QtCamConfig *CameraConfig::config() const {
 }
 
 void CameraConfig::classBegin() {
+#if defined(QT4)
+  QDeclarativeParserStatus::classBegin();
+#elif defined(QT5)
+  QQmlParserStatus::classBegin();
+#endif
+
   // Nothing
 }
 
 void CameraConfig::componentComplete() {
+#if defined(QT4)
+  QDeclarativeParserStatus::componentComplete();
+#elif defined(QT5)
+  QQmlParserStatus::componentComplete();
+#endif
+
   if (m_config) {
     return;
   }