Added missing camera error strings
authorBernd Weimer <bweimer@blackberry.com>
Mon, 30 Sep 2013 15:28:51 +0000 (17:28 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 1 Oct 2013 07:11:23 +0000 (09:11 +0200)
On BlackBerry some camera error codes were not mapped to
corresponding strings.

Change-Id: I3c26f07eccc7204b89a387e83d342f6821773a1b
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
src/plugins/blackberry/camera/bbcamerasession.cpp

index 24e0a37..e7f82d5 100644 (file)
@@ -75,6 +75,8 @@ static QString errorToString(camera_error_t error)
         return QLatin1String("No permission");
     case CAMERA_EBADR:
         return QLatin1String("Invalid file descriptor");
+    case CAMERA_ENODATA:
+        return QLatin1String("Data does not exist");
     case CAMERA_ENOENT:
         return QLatin1String("File or directory does not exists");
     case CAMERA_ENOMEM:
@@ -85,6 +87,8 @@ static QString errorToString(camera_error_t error)
         return QLatin1String("Communication timeout");
     case CAMERA_EALREADY:
         return QLatin1String("Operation already in progress");
+    case CAMERA_EBUSY:
+        return QLatin1String("Camera busy");
     case CAMERA_ENOSPC:
         return QLatin1String("Disk is full");
     case CAMERA_EUNINIT:
@@ -95,6 +99,12 @@ static QString errorToString(camera_error_t error)
         return QLatin1String("Microphone in use already");
     case CAMERA_EDESKTOPCAMERAINUSE:
         return QLatin1String("Desktop camera in use already");
+    case CAMERA_EPOWERDOWN:
+        return QLatin1String("Camera in power down state");
+    case CAMERA_3ALOCKED:
+        return QLatin1String("3A have been locked");
+    case CAMERA_EVIEWFINDERFROZEN:
+        return QLatin1String("Freeze flag set");
     default:
         return QLatin1String("Unknown error");
     }