Call parent class componentComplete()
authorMohammed Sameer <msameer@foolab.org>
Mon, 29 Jul 2013 01:44:25 +0000 (04:44 +0300)
committerMohammed Sameer <msameer@foolab.org>
Wed, 31 Jul 2013 17:11:17 +0000 (20:11 +0300)
declarative/videoplayer.cpp
declarative/viewfinder.cpp

index 0866f0c..dcb4765 100644 (file)
@@ -68,6 +68,12 @@ VideoPlayer::~VideoPlayer() {
 }
 
 void VideoPlayer::componentComplete() {
+#if defined(QT4)
+  QDeclarativeItem::componentComplete();
+#elif defined(QT5)
+  QQuickPaintedItem::componentComplete();
+#endif
+
   if (!m_config) {
     qmlInfo(this) << "CameraConfig not set";
     return;
index 17a7659..6c9c36f 100644 (file)
@@ -31,6 +31,7 @@
 #endif
 #include <QPainter>
 #include "qtcamdevice.h"
+#include <QMatrix4x4>
 
 #if defined(QT4)
 Viewfinder::Viewfinder(QDeclarativeItem *parent) :
@@ -184,6 +185,12 @@ void Viewfinder::geometryChanged(const QRectF& newGeometry, const QRectF& oldGeo
 }
 
 void Viewfinder::componentComplete() {
+#if defined(QT4)
+  QDeclarativeItem::componentComplete();
+#elif defined(QT5)
+  QQuickPaintedItem::componentComplete();
+#endif
+
   if (!m_cam) {
     qmlInfo(this) << "Camera not set";
     return;