summaryrefslogtreecommitdiffhomepage
path: root/compat/camera-names.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/camera-names.cpp')
-rw-r--r--compat/camera-names.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/compat/camera-names.cpp b/compat/camera-names.cpp
index 69926e5a..40edba49 100644
--- a/compat/camera-names.cpp
+++ b/compat/camera-names.cpp
@@ -11,6 +11,10 @@
# include <unistd.h>
#endif
+#ifdef __APPLE__
+# include <QCameraInfo>
+#endif
+
#ifdef __linux
# include <fcntl.h>
# include <sys/ioctl.h>
@@ -102,5 +106,12 @@ std::vector<QString> get_camera_names()
}
}
#endif
+#ifdef __APPLE__
+ QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
+ foreach (const QCameraInfo &cameraInfo, cameras) {
+ ret.push_back(cameraInfo.description());
+ }
+#endif
+
return ret;
}