Added error reporting
authorMohammed Sameer <msameer@foolab.org>
Thu, 18 Jul 2013 16:25:55 +0000 (19:25 +0300)
committerMohammed Sameer <msameer@foolab.org>
Thu, 18 Jul 2013 16:25:55 +0000 (19:25 +0300)
qml/PostCaptureItem.qml
qml/VideoPlayerPage.qml

index 6cd193e..0cd065f 100644 (file)
@@ -36,6 +36,7 @@ Item {
         loader.source = Qt.resolvedUrl("VideoPlayerPage.qml")
         loader.item.source = itemData.url
         if (!loader.item.play()) {
+            showError(qsTr("Error playing video. Please try again."))
             loader.source = ""
         }
     }
index 5fb702a..c87e507 100644 (file)
@@ -26,8 +26,6 @@ import CameraPlus 1.0
 import QtCamera 1.0
 import QtCameraExtras 1.0
 
-// TODO: error reporting
-
 Item {
     id: page
 
@@ -59,6 +57,8 @@ Item {
         anchors.fill: parent
         cameraConfig: cam.cameraConfig
 
+        onError: showError(qsTr("Error playing video. Please try again or restart the application"))
+
         function toggle() {
             if (!video.paused) {
                 video.pause()