Silence g++/moc warnings
authorMohammed Sameer <msameer@foolab.org>
Sat, 22 Sep 2012 10:12:27 +0000 (13:12 +0300)
committerMohammed Sameer <msameer@foolab.org>
Sat, 22 Sep 2012 10:12:27 +0000 (13:12 +0300)
imports/previewprovider.cpp
lib/qtcamdevice.cpp
lib/qtcamviewfinderrenderergeneric.cpp
lib/qtcamviewfinderrenderermeego.cpp
qml/main.qml
src/cameraresources.cpp
src/filenaming.cpp
src/filenaming.h

index 7999608..df1d533 100644 (file)
@@ -33,6 +33,8 @@ PreviewProvider::~PreviewProvider() {
 }
 
 QImage PreviewProvider::requestImage(const QString& id, QSize *size, const QSize& requestedSize) {
 }
 
 QImage PreviewProvider::requestImage(const QString& id, QSize *size, const QSize& requestedSize) {
+  Q_UNUSED(id);
+
   QMutexLocker lock(&m_mutex);
 
   QImage res = m_image;
   QMutexLocker lock(&m_mutex);
 
   QImage res = m_image;
index 44745e0..bf9dd54 100644 (file)
@@ -29,6 +29,8 @@
 #include "qtcamimagemode.h"
 #include "qtcamvideomode.h"
 
 #include "qtcamimagemode.h"
 #include "qtcamvideomode.h"
 
+// TODO: we want the ability to change the image and video gep from the app.
+
 QtCamDevice::QtCamDevice(QtCamConfig *config, const QString& name,
                         const QVariant& id, QObject *parent) :
   QObject(parent), d_ptr(new QtCamDevicePrivate) {
 QtCamDevice::QtCamDevice(QtCamConfig *config, const QString& name,
                         const QVariant& id, QObject *parent) :
   QObject(parent), d_ptr(new QtCamDevicePrivate) {
index bea6eca..5d78f9e 100644 (file)
@@ -130,6 +130,8 @@ void QtCamViewfinderRendererGeneric::on_gst_buffer(GstElement *element,
                                                   GstBuffer *buf, GstPad *pad,
                                                   QtCamViewfinderRendererGeneric *q) {
 
                                                   GstBuffer *buf, GstPad *pad,
                                                   QtCamViewfinderRendererGeneric *q) {
 
+  Q_UNUSED(element);
+
   q->m_mutex.lock();
 
   if (!q->m_elem) {
   q->m_mutex.lock();
 
   if (!q->m_elem) {
@@ -156,6 +158,8 @@ void QtCamViewfinderRendererGeneric::sink_notify(QtCamViewfinderRendererGeneric
                                                 GObject *object,
                                                 gboolean is_last_ref) {
 
                                                 GObject *object,
                                                 gboolean is_last_ref) {
 
+  Q_UNUSED(object);
+
   if (is_last_ref) {
     g_object_remove_toggle_ref(G_OBJECT(q->m_elem), (GToggleNotify)sink_notify, q);
     q->m_elem = 0;
   if (is_last_ref) {
     g_object_remove_toggle_ref(G_OBJECT(q->m_elem), (GToggleNotify)sink_notify, q);
     q->m_elem = 0;
index 95f8959..b3d9866 100644 (file)
@@ -183,6 +183,8 @@ void QtCamViewfinderRendererMeeGo::frame_ready(GstElement *sink, int frame,
 void QtCamViewfinderRendererMeeGo::sink_notify(QtCamViewfinderRendererMeeGo *q,
                                               GObject *object, gboolean is_last_ref) {
 
 void QtCamViewfinderRendererMeeGo::sink_notify(QtCamViewfinderRendererMeeGo *q,
                                               GObject *object, gboolean is_last_ref) {
 
+  Q_UNUSED(object);
+
   if (is_last_ref) {
     g_signal_handler_disconnect(q->m_sink, q->m_id);
     g_object_remove_toggle_ref(G_OBJECT(q->m_sink), (GToggleNotify)sink_notify, q);
   if (is_last_ref) {
     g_signal_handler_disconnect(q->m_sink, q->m_id);
     g_object_remove_toggle_ref(G_OBJECT(q->m_sink), (GToggleNotify)sink_notify, q);
index 46e349b..ceda507 100644 (file)
@@ -34,7 +34,6 @@ import QtMobility.location 1.2
 // TODO: disk space
 // TODO: flash not ready
 // TODO: focus, caf, ...
 // TODO: disk space
 // TODO: flash not ready
 // TODO: focus, caf, ...
-// TODO: indicators
 // TODO: portrait/landscape
 // TODO: record video in a hidden directory and then copy the video to avoid tracker indexing it.
 // TODO: stop viewfinder in settings pages ?
 // TODO: portrait/landscape
 // TODO: record video in a hidden directory and then copy the video to avoid tracker indexing it.
 // TODO: stop viewfinder in settings pages ?
index b28cc52..ef37f0f 100644 (file)
@@ -142,6 +142,8 @@ QList<ResourcePolicy::ResourceType> CameraResources::listSet() {
 void CameraResources::updateSet(const QList<ResourcePolicy::ResourceType>& required,
                                const QList<ResourcePolicy::ResourceType>& optional) {
 
 void CameraResources::updateSet(const QList<ResourcePolicy::ResourceType>& required,
                                const QList<ResourcePolicy::ResourceType>& optional) {
 
+  Q_UNUSED(optional);
+
   bool isEmpty = m_set->resources().isEmpty();
 
   QList<ResourcePolicy::ResourceType> set = listSet();
   bool isEmpty = m_set->resources().isEmpty();
 
   QList<ResourcePolicy::ResourceType> set = listSet();
index a72fa47..dcfa623 100644 (file)
@@ -35,12 +35,26 @@ FileNaming::~FileNaming() {
 
 }
 
 
 }
 
+QString FileNaming::imageSuffix() const {
+  return m_image;
+}
+
 void FileNaming::setImageSuffix(const QString& suffix) {
 void FileNaming::setImageSuffix(const QString& suffix) {
-  m_image = suffix;
+  if (m_image != suffix) {
+    m_image = suffix;
+    emit imageSuffixChanged();
+  }
+}
+
+QString FileNaming::videoSuffix() const {
+  return m_video;
 }
 
 void FileNaming::setVideoSuffix(const QString& suffix) {
 }
 
 void FileNaming::setVideoSuffix(const QString& suffix) {
-  m_video = suffix;
+  if (m_video != suffix) {
+    m_video = suffix;
+    emit videoSuffixChanged();
+  }
 }
 
 QString FileNaming::imageFileName() {
 }
 
 QString FileNaming::imageFileName() {
index d2f0944..d641ae9 100644 (file)
 class FileNaming : public QObject {
   Q_OBJECT
 
 class FileNaming : public QObject {
   Q_OBJECT
 
-  Q_PROPERTY(QString imageSuffix WRITE setImageSuffix);
-  Q_PROPERTY(QString videoSuffix WRITE setVideoSuffix);
+  Q_PROPERTY(QString imageSuffix READ imageSuffix WRITE setImageSuffix NOTIFY imageSuffixChanged);
+  Q_PROPERTY(QString videoSuffix READ videoSuffix WRITE setVideoSuffix NOTIFY videoSuffixChanged);
 
 public:
   FileNaming(QObject *parent = 0);
   ~FileNaming();
 
 
 public:
   FileNaming(QObject *parent = 0);
   ~FileNaming();
 
+  QString imageSuffix() const;
   void setImageSuffix(const QString& suffix);
   void setImageSuffix(const QString& suffix);
+
+  QString videoSuffix() const;
   void setVideoSuffix(const QString& suffix);
 
   Q_INVOKABLE QString imageFileName();
   Q_INVOKABLE QString videoFileName();
 
   void setVideoSuffix(const QString& suffix);
 
   Q_INVOKABLE QString imageFileName();
   Q_INVOKABLE QString videoFileName();
 
+signals:
+  void imageSuffixChanged();
+  void videoSuffixChanged();
+
 private:
   QString fileName(const QString& suffix);
 
 private:
   QString fileName(const QString& suffix);