diff options
author | Stanislaw Halik <sthalik@tehran.lain.pl> | 2020-01-13 15:02:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-13 15:02:44 +0100 |
commit | 50f23dc21fce9d382893ad77dc29fd343ee2134c (patch) | |
tree | 663c0c38fc91b3d021ad8d38ba8ea5b7c0e5b647 /compat | |
parent | fb994308266093382fffecb8a3fd2645ab811117 (diff) | |
parent | 2d709bb4755305342b79a1574c90b2be348b4c4d (diff) |
Merge pull request #1006 from rvt/osx-build-fix
OSX Build fixes
Diffstat (limited to 'compat')
-rw-r--r-- | compat/camera-names.cpp | 11 |
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; } |