Emit canCaptureChanged() for the active mode when we get an error
authorMohammed Sameer <msameer@foolab.org>
Fri, 14 Sep 2012 10:20:29 +0000 (13:20 +0300)
committerMohammed Sameer <msameer@foolab.org>
Fri, 14 Sep 2012 10:20:29 +0000 (13:20 +0300)
lib/qtcamdevice_p.h

index 35bfe17..de62e6c 100644 (file)
@@ -114,6 +114,10 @@ public:
 
     QMetaObject::invokeMethod(q_ptr, "error", Q_ARG(QString, message),
                              Q_ARG(int, code), Q_ARG(QString, debug));
+
+    if (active) {
+      QMetaObject::invokeMethod(active, "canCaptureChanged", Qt::QueuedConnection);
+    }
   }
 
   void _d_stopped() {