Don't forget to call base class implementation
authorMohammed Sameer <msameer@foolab.org>
Mon, 26 Aug 2013 21:41:30 +0000 (00:41 +0300)
committerMohammed Sameer <msameer@foolab.org>
Mon, 26 Aug 2013 21:41:30 +0000 (00:41 +0300)
declarative/cameraconfig.cpp
declarative/videoplayer.cpp

index 169c34c..61ac943 100644 (file)
@@ -61,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;
   }
index ce311a2..e6c3f6c 100644 (file)
@@ -95,6 +95,12 @@ void VideoPlayer::componentComplete() {
 }
 
 void VideoPlayer::classBegin() {
+#if defined(QT4)
+  QDeclarativeItem::classBegin();
+#elif defined(QT5)
+  QQuickPaintedItem::classBegin();
+#endif
+
   m_bin = gst_element_factory_make ("playbin2", "VideoPlayerBin");
   if (!m_bin) {
     qmlInfo(this) << "Failed to create playbin2";