You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2014/08/06 00:09:52 UTC

[2/3] git commit: ubuntu: fix compler warnings

ubuntu: fix compler warnings


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/139e2806
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/139e2806
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/139e2806

Branch: refs/heads/master
Commit: 139e2806939469a4f890c1465e7036c60c11659e
Parents: 2407918
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Sun Jul 27 00:50:14 2014 +0400
Committer: Maxim Ermilov <ma...@canonical.com>
Committed: Sun Jul 27 00:50:14 2014 +0400

----------------------------------------------------------------------
 src/ubuntu/capture.cpp | 8 +++-----
 src/ubuntu/capture.h   | 6 +++---
 2 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/139e2806/src/ubuntu/capture.cpp
----------------------------------------------------------------------
diff --git a/src/ubuntu/capture.cpp b/src/ubuntu/capture.cpp
index c18d289..aaf0910 100644
--- a/src/ubuntu/capture.cpp
+++ b/src/ubuntu/capture.cpp
@@ -50,7 +50,7 @@ static QString formatFile(const QMimeDatabase &db, const QString &path) {
 MediaCapture::MediaCapture(Cordova *cordova): CPlugin(cordova), _scId(0), _ecId(0) {
 }
 
-void MediaCapture::captureAudio(int scId, int ecId, QVariantMap options) {
+void MediaCapture::captureAudio(int scId, int ecId, const QVariantMap &) {
     if (_scId || _ecId) {
         this->callback(_ecId, QString("{code: %1}").arg(CAPTURE_APPLICATION_BUSY));
         return;
@@ -118,7 +118,7 @@ void MediaCapture::cancel() {
     _recorder.clear();
 }
 
-void MediaCapture::captureVideo(int scId, int ecId, QVariantMap options) {
+void MediaCapture::captureVideo(int scId, int ecId, const QVariantMap &) {
     if (_scId || _ecId) {
         this->callback(_ecId, QString("{code: %1}").arg(CAPTURE_APPLICATION_BUSY));
         return;
@@ -141,15 +141,13 @@ void MediaCapture::onVideoRecordEnd(const QString &uri) {
     m_cordova->execQML("CordovaWrapper.global.captureObject.destroy()");
 }
 
-void MediaCapture::captureImage(int scId, int ecId, QVariantMap options) {
+void MediaCapture::captureImage(int scId, int ecId, const QVariantMap &) {
     if (_scId || _ecId) {
         this->callback(_ecId, QString("{code: %1}").arg(CAPTURE_APPLICATION_BUSY));
         return;
     }
 
     QString path = m_cordova->get_app_dir() + "/../qml/MediaCaptureWidget.qml";
-
-    // TODO: relative url
     QString qml = QString(code).arg(CordovaInternal::format(path)).arg("camera");
     m_cordova->execQML(qml);
 

http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/139e2806/src/ubuntu/capture.h
----------------------------------------------------------------------
diff --git a/src/ubuntu/capture.h b/src/ubuntu/capture.h
index 4499dbe..4806771 100644
--- a/src/ubuntu/capture.h
+++ b/src/ubuntu/capture.h
@@ -43,9 +43,9 @@ public:
     }
 
 public slots:
-    void captureAudio(int scId, int ecId, QVariantMap options);
-    void captureImage(int scId, int ecId, QVariantMap options);
-    void captureVideo(int scId, int ecId, QVariantMap options);
+    void captureAudio(int scId, int ecId, const QVariantMap &);
+    void captureImage(int scId, int ecId, const QVariantMap &);
+    void captureVideo(int scId, int ecId, const QVariantMap &);
 
     void recordAudio();
     void cancel();