summaryrefslogtreecommitdiffstats
path: root/src/plugins/avfoundation/camera/avfcameraservice.mm
diff options
context:
space:
mode:
authorJochen Seemann <seemann.jochen@gmail.com>2018-07-22 22:19:56 +0200
committerJochen Seemann <seemann.jochen@gmail.com>2019-01-04 22:21:01 +0000
commit2403f8dc6f1f72bab326025a78b98ec5f81a3d34 (patch)
treedcd127d3378716a7788be10865dafa5ca3121a1c /src/plugins/avfoundation/camera/avfcameraservice.mm
parent34d15785600f98faa4a51827b452d6c488e4c10c (diff)
avfoundation: modernize by using nullptr and override
Change-Id: Ifd483f925ed69f0ba35c46facfdb571dea87c1ac Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
Diffstat (limited to 'src/plugins/avfoundation/camera/avfcameraservice.mm')
-rw-r--r--src/plugins/avfoundation/camera/avfcameraservice.mm18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/avfoundation/camera/avfcameraservice.mm b/src/plugins/avfoundation/camera/avfcameraservice.mm
index 71ea31e5b..33b4b72aa 100644
--- a/src/plugins/avfoundation/camera/avfcameraservice.mm
+++ b/src/plugins/avfoundation/camera/avfcameraservice.mm
@@ -74,7 +74,7 @@ QT_USE_NAMESPACE
AVFCameraService::AVFCameraService(QObject *parent):
QMediaService(parent),
- m_videoOutput(0)
+ m_videoOutput(nullptr)
{
m_session = new AVFCameraSession(this);
m_cameraControl = new AVFCameraControl(this);
@@ -93,12 +93,12 @@ AVFCameraService::AVFCameraService(QObject *parent):
#endif
m_imageCaptureControl = new AVFImageCaptureControl(this);
m_cameraFocusControl = new AVFCameraFocusControl(this);
- m_cameraExposureControl = 0;
+ m_cameraExposureControl = nullptr;
#ifdef Q_OS_IOS
m_cameraExposureControl = new AVFCameraExposureControl(this);
#endif
- m_cameraZoomControl = 0;
+ m_cameraZoomControl = nullptr;
#ifdef Q_OS_IOS
m_cameraZoomControl = new AVFCameraZoomControl(this);
#endif
@@ -120,9 +120,9 @@ AVFCameraService::~AVFCameraService()
#endif
if (m_videoOutput) {
- m_session->setVideoOutput(0);
+ m_session->setVideoOutput(nullptr);
delete m_videoOutput;
- m_videoOutput = 0;
+ m_videoOutput = nullptr;
}
//delete controls before session,
@@ -199,7 +199,7 @@ QMediaControl *AVFCameraService::requestControl(const char *name)
return m_mediaContainerControl;
if (qstrcmp(name,QMediaVideoProbeControl_iid) == 0) {
- AVFMediaVideoProbeControl *videoProbe = 0;
+ AVFMediaVideoProbeControl *videoProbe = nullptr;
videoProbe = new AVFMediaVideoProbeControl(this);
m_session->addProbe(videoProbe);
return videoProbe;
@@ -220,7 +220,7 @@ QMediaControl *AVFCameraService::requestControl(const char *name)
}
}
- return 0;
+ return nullptr;
}
void AVFCameraService::releaseControl(QMediaControl *control)
@@ -230,9 +230,9 @@ void AVFCameraService::releaseControl(QMediaControl *control)
m_session->removeProbe(videoProbe);
delete videoProbe;
} else if (m_videoOutput == control) {
- m_session->setVideoOutput(0);
+ m_session->setVideoOutput(nullptr);
delete m_videoOutput;
- m_videoOutput = 0;
+ m_videoOutput = nullptr;
}
}