summaryrefslogtreecommitdiffstats
path: root/src/plugins/avfoundation
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2018-02-12 13:16:42 -0800
committerJake Petroules <jake.petroules@qt.io>2018-02-12 21:25:44 +0000
commit8f907367e999a359a58c256cdce8dc7cf39a3382 (patch)
treeab3373ab3c8039dd2ec09e6175a3cf7683948d48 /src/plugins/avfoundation
parentdbcf6d7f0209df2faf1c50c253af490ddcc96930 (diff)
Remove obsolete code paths
Change-Id: I331f48cc6776b2fc6bb2efc2829555f8284eeff9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Diffstat (limited to 'src/plugins/avfoundation')
-rw-r--r--src/plugins/avfoundation/camera/avfcameraexposurecontrol.mm23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/plugins/avfoundation/camera/avfcameraexposurecontrol.mm b/src/plugins/avfoundation/camera/avfcameraexposurecontrol.mm
index 9e901f83b..7540ab86c 100644
--- a/src/plugins/avfoundation/camera/avfcameraexposurecontrol.mm
+++ b/src/plugins/avfoundation/camera/avfcameraexposurecontrol.mm
@@ -56,10 +56,9 @@ QT_BEGIN_NAMESPACE
namespace {
-// All these methods to work with exposure/ISO/SS in custom mode
-// are quite new (iOS 8 or later and no OS X support).
+// All these methods to work with exposure/ISO/SS in custom mode do not support macOS.
-#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_8_0)
+#ifdef Q_OS_IOS
// Misc. helpers to check values/ranges:
@@ -213,7 +212,7 @@ void qt_set_duration_iso(QPointer<AVFCameraService> service, QPointer<AVFCameraE
completionHandler:completionHandler];
}
-#endif // QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_8_0)
+#endif // defined(Q_OS_IOS)
} // Unnamed namespace.
@@ -230,7 +229,7 @@ AVFCameraExposureControl::AVFCameraExposureControl(AVFCameraService *service)
bool AVFCameraExposureControl::isParameterSupported(ExposureParameter parameter) const
{
-#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_8_0)
+#ifdef Q_OS_IOS
AVCaptureDevice *captureDevice = m_session->videoCaptureDevice();
if (!captureDevice)
return false;
@@ -250,7 +249,7 @@ QVariantList AVFCameraExposureControl::supportedParameterRange(ExposureParameter
bool *continuous) const
{
QVariantList parameterRange;
-#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_8_0)
+#ifdef Q_OS_IOS
AVCaptureDevice *captureDevice = m_session->videoCaptureDevice();
if (!captureDevice || !isParameterSupported(parameter)) {
@@ -333,7 +332,7 @@ QVariant AVFCameraExposureControl::requestedValue(ExposureParameter parameter) c
QVariant AVFCameraExposureControl::actualValue(ExposureParameter parameter) const
{
-#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_8_0)
+#ifdef Q_OS_IOS
AVCaptureDevice *captureDevice = m_session->videoCaptureDevice();
if (!captureDevice || !isParameterSupported(parameter)) {
// Actually, at the moment !captiredevice => !isParameterSupported.
@@ -386,7 +385,7 @@ bool AVFCameraExposureControl::setValue(ExposureParameter parameter, const QVari
bool AVFCameraExposureControl::setExposureMode(const QVariant &value)
{
-#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_8_0)
+#ifdef Q_OS_IOS
if (!value.canConvert<QCameraExposure::ExposureMode>()) {
qDebugCamera() << Q_FUNC_INFO << "invalid exposure mode value,"
<< "QCameraExposure::ExposureMode expected";
@@ -433,7 +432,7 @@ bool AVFCameraExposureControl::setExposureMode(const QVariant &value)
bool AVFCameraExposureControl::setExposureCompensation(const QVariant &value)
{
-#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_8_0)
+#ifdef Q_OS_IOS
if (!value.canConvert<qreal>()) {
qDebugCamera() << Q_FUNC_INFO << "invalid exposure compensation"
<<"value, floating point number expected";
@@ -474,7 +473,7 @@ bool AVFCameraExposureControl::setExposureCompensation(const QVariant &value)
bool AVFCameraExposureControl::setShutterSpeed(const QVariant &value)
{
-#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_8_0)
+#ifdef Q_OS_IOS
if (value.isNull())
return setExposureMode(QVariant::fromValue(QCameraExposure::ExposureAuto));
@@ -521,7 +520,7 @@ bool AVFCameraExposureControl::setShutterSpeed(const QVariant &value)
bool AVFCameraExposureControl::setISO(const QVariant &value)
{
-#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_8_0)
+#ifdef Q_OS_IOS
if (value.isNull())
return setExposureMode(QVariant::fromValue(QCameraExposure::ExposureAuto));
@@ -565,7 +564,7 @@ bool AVFCameraExposureControl::setISO(const QVariant &value)
void AVFCameraExposureControl::cameraStateChanged()
{
-#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_8_0)
+#ifdef Q_OS_IOS
if (m_session->state() != QCamera::ActiveState)
return;