diff options
author | Kevin Funk <kevin.funk@kdab.com> | 2017-09-24 23:54:59 +0200 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2017-09-27 08:06:15 +0000 |
commit | acc49e582abf76c962851f53cbd66134812f6a1f (patch) | |
tree | ba82ce531f711397af949ac62fa9b0ca06158c11 /src/plugins | |
parent | 97009b6470c09b9889870873a5c82a6a0bb565f8 (diff) |
Replace Q_NULLPTR with nullptr
Change-Id: I3b7601b4a97f8a2b1d2da6ef134f1577846ba713
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/plugins')
14 files changed, 46 insertions, 46 deletions
diff --git a/src/plugins/android/src/mediacapture/qandroidcameravideorenderercontrol.cpp b/src/plugins/android/src/mediacapture/qandroidcameravideorenderercontrol.cpp index 1f33b1e55..2243df732 100644 --- a/src/plugins/android/src/mediacapture/qandroidcameravideorenderercontrol.cpp +++ b/src/plugins/android/src/mediacapture/qandroidcameravideorenderercontrol.cpp @@ -108,7 +108,7 @@ QAndroidCameraDataVideoOutput::QAndroidCameraDataVideoOutput(QAndroidCameraVideo QAndroidCameraDataVideoOutput::~QAndroidCameraDataVideoOutput() { - m_control->cameraSession()->setPreviewCallback(Q_NULLPTR); + m_control->cameraSession()->setPreviewCallback(nullptr); delete m_surfaceView; } @@ -146,7 +146,7 @@ void QAndroidCameraDataVideoOutput::configureFormat() } if (m_pixelFormat == QVideoFrame::Format_Invalid) { - m_control->cameraSession()->setPreviewCallback(Q_NULLPTR); + m_control->cameraSession()->setPreviewCallback(nullptr); qWarning("The video surface is not compatible with any format supported by the camera"); } else { m_control->cameraSession()->setPreviewCallback(this); diff --git a/src/plugins/avfoundation/camera/avfcameraexposurecontrol.mm b/src/plugins/avfoundation/camera/avfcameraexposurecontrol.mm index 591854204..9e901f83b 100644 --- a/src/plugins/avfoundation/camera/avfcameraexposurecontrol.mm +++ b/src/plugins/avfoundation/camera/avfcameraexposurecontrol.mm @@ -219,7 +219,7 @@ void qt_set_duration_iso(QPointer<AVFCameraService> service, QPointer<AVFCameraE AVFCameraExposureControl::AVFCameraExposureControl(AVFCameraService *service) : m_service(service), - m_session(Q_NULLPTR) + m_session(nullptr) { Q_ASSERT(service); m_session = m_service->session(); diff --git a/src/plugins/directshow/camera/dscamerasession.cpp b/src/plugins/directshow/camera/dscamerasession.cpp index 55ab868ce..195712057 100644 --- a/src/plugins/directshow/camera/dscamerasession.cpp +++ b/src/plugins/directshow/camera/dscamerasession.cpp @@ -56,15 +56,15 @@ QT_BEGIN_NAMESPACE DSCameraSession::DSCameraSession(QObject *parent) : QObject(parent) - , m_graphBuilder(Q_NULLPTR) - , m_filterGraph(Q_NULLPTR) + , m_graphBuilder(nullptr) + , m_filterGraph(nullptr) , m_sourceDeviceName(QLatin1String("default")) - , m_sourceFilter(Q_NULLPTR) + , m_sourceFilter(nullptr) , m_needsHorizontalMirroring(false) - , m_previewSampleGrabber(Q_NULLPTR) - , m_nullRendererFilter(Q_NULLPTR) + , m_previewSampleGrabber(nullptr) + , m_nullRendererFilter(nullptr) , m_previewStarted(false) - , m_surface(Q_NULLPTR) + , m_surface(nullptr) , m_previewPixelFormat(QVideoFrame::Format_Invalid) , m_readyForCapture(false) , m_imageIdCounter(0) diff --git a/src/plugins/directshow/player/directshowvideorenderercontrol.cpp b/src/plugins/directshow/player/directshowvideorenderercontrol.cpp index 40f77e899..ee7f5ec9e 100644 --- a/src/plugins/directshow/player/directshowvideorenderercontrol.cpp +++ b/src/plugins/directshow/player/directshowvideorenderercontrol.cpp @@ -63,7 +63,7 @@ DirectShowVideoRendererControl::~DirectShowVideoRendererControl() { #if QT_CONFIG(evr) if (m_evrPresenter) { - m_evrPresenter->setSurface(Q_NULLPTR); + m_evrPresenter->setSurface(nullptr); m_evrPresenter->Release(); } #endif @@ -83,7 +83,7 @@ void DirectShowVideoRendererControl::setSurface(QAbstractVideoSurface *surface) #if QT_CONFIG(evr) if (m_evrPresenter) { - m_evrPresenter->setSurface(Q_NULLPTR); + m_evrPresenter->setSurface(nullptr); m_evrPresenter->Release(); m_evrPresenter = 0; } diff --git a/src/plugins/gstreamer/camerabin/camerabinimageprocessing.cpp b/src/plugins/gstreamer/camerabin/camerabinimageprocessing.cpp index f819c9f24..9d281e10c 100644 --- a/src/plugins/gstreamer/camerabin/camerabinimageprocessing.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinimageprocessing.cpp @@ -58,7 +58,7 @@ CameraBinImageProcessing::CameraBinImageProcessing(CameraBinSession *session) , m_session(session) , m_whiteBalanceMode(QCameraImageProcessing::WhiteBalanceAuto) #if QT_CONFIG(linux_v4l) - , m_v4lImageControl(Q_NULLPTR) + , m_v4lImageControl(nullptr) #endif { #if QT_CONFIG(gstreamer_photography) diff --git a/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp b/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp index 2d3c7c2ea..4f45a0a2f 100644 --- a/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp @@ -74,7 +74,7 @@ QMediaService* CameraBinServicePlugin::create(const QString &key) "GStreamer %u.%u." "\nPlease install the 'bad' GStreamer plugin package.", major, minor); - return Q_NULLPTR; + return nullptr; } return new CameraBinService(sourceFactory()); diff --git a/src/plugins/opensles/qopenslesaudiooutput.cpp b/src/plugins/opensles/qopenslesaudiooutput.cpp index 70d77a380..0b1f444bd 100644 --- a/src/plugins/opensles/qopenslesaudiooutput.cpp +++ b/src/plugins/opensles/qopenslesaudiooutput.cpp @@ -69,13 +69,13 @@ QOpenSLESAudioOutput::QOpenSLESAudioOutput(const QByteArray &device) : m_deviceName(device), m_state(QAudio::StoppedState), m_error(QAudio::NoError), - m_outputMixObject(Q_NULLPTR), - m_playerObject(Q_NULLPTR), - m_playItf(Q_NULLPTR), - m_volumeItf(Q_NULLPTR), - m_bufferQueueItf(Q_NULLPTR), - m_audioSource(Q_NULLPTR), - m_buffers(Q_NULLPTR), + m_outputMixObject(nullptr), + m_playerObject(nullptr), + m_playItf(nullptr), + m_volumeItf(nullptr), + m_bufferQueueItf(nullptr), + m_audioSource(nullptr), + m_buffers(nullptr), m_volume(1.0), m_pullMode(false), m_nextBuffer(0), @@ -157,7 +157,7 @@ QIODevice *QOpenSLESAudioOutput::start() stop(); if (!preparePlayer()) - return Q_NULLPTR; + return nullptr; m_pullMode = false; m_processedBytes = 0; @@ -458,8 +458,8 @@ bool QOpenSLESAudioOutput::preparePlayer() if (SL_RESULT_SUCCESS != (*engine)->CreateOutputMix(engine, &m_outputMixObject, 0, - Q_NULLPTR, - Q_NULLPTR)) { + nullptr, + nullptr)) { qWarning() << "Unable to create output mix"; setError(QAudio::FatalError); return false; @@ -472,7 +472,7 @@ bool QOpenSLESAudioOutput::preparePlayer() } SLDataLocator_OutputMix outputMixLocator = { SL_DATALOCATOR_OUTPUTMIX, m_outputMixObject }; - SLDataSink audioSink = { &outputMixLocator, Q_NULLPTR }; + SLDataSink audioSink = { &outputMixLocator, nullptr }; #ifndef ANDROID const int iids = 2; @@ -598,28 +598,28 @@ void QOpenSLESAudioOutput::destroyPlayer() if (m_playerObject) { (*m_playerObject)->Destroy(m_playerObject); - m_playerObject = Q_NULLPTR; + m_playerObject = nullptr; } if (m_outputMixObject) { (*m_outputMixObject)->Destroy(m_outputMixObject); - m_outputMixObject = Q_NULLPTR; + m_outputMixObject = nullptr; } if (!m_pullMode && m_audioSource) { m_audioSource->close(); delete m_audioSource; - m_audioSource = Q_NULLPTR; + m_audioSource = nullptr; } delete [] m_buffers; - m_buffers = Q_NULLPTR; + m_buffers = nullptr; m_processedBytes = 0; m_nextBuffer = 0; m_availableBuffers.storeRelease(BUFFER_COUNT); - m_playItf = Q_NULLPTR; - m_volumeItf = Q_NULLPTR; - m_bufferQueueItf = Q_NULLPTR; + m_playItf = nullptr; + m_volumeItf = nullptr; + m_bufferQueueItf = nullptr; m_startRequiresInit = true; } @@ -630,7 +630,7 @@ void QOpenSLESAudioOutput::stopPlayer() if (m_audioSource && !m_pullMode) { m_audioSource->close(); delete m_audioSource; - m_audioSource = Q_NULLPTR; + m_audioSource = nullptr; } // We need to change the state manually... diff --git a/src/plugins/pulseaudio/qaudioinput_pulse.cpp b/src/plugins/pulseaudio/qaudioinput_pulse.cpp index 050731071..2b5325132 100644 --- a/src/plugins/pulseaudio/qaudioinput_pulse.cpp +++ b/src/plugins/pulseaudio/qaudioinput_pulse.cpp @@ -226,7 +226,7 @@ QIODevice *QPulseAudioInput::start() close(); if (!open()) - return Q_NULLPTR; + return nullptr; m_pullMode = false; m_audioSource = new PulseInputPrivate(this); diff --git a/src/plugins/pulseaudio/qaudiooutput_pulse.cpp b/src/plugins/pulseaudio/qaudiooutput_pulse.cpp index 0c7dc270a..3c20908dc 100644 --- a/src/plugins/pulseaudio/qaudiooutput_pulse.cpp +++ b/src/plugins/pulseaudio/qaudiooutput_pulse.cpp @@ -256,7 +256,7 @@ QIODevice *QPulseAudioOutput::start() m_pullMode = false; if (!open()) - return Q_NULLPTR; + return nullptr; m_audioSource = new PulseOutputPrivate(this); m_audioSource->open(QIODevice::WriteOnly|QIODevice::Unbuffered); diff --git a/src/plugins/winrt/qwinrtcameracontrol.cpp b/src/plugins/winrt/qwinrtcameracontrol.cpp index 343903bc3..5a14059c4 100644 --- a/src/plugins/winrt/qwinrtcameracontrol.cpp +++ b/src/plugins/winrt/qwinrtcameracontrol.cpp @@ -247,7 +247,7 @@ public: { if (m_pendingSamples.load() < 3) { m_pendingSamples.ref(); - return QueueEvent(MEStreamSinkRequestSample, GUID_NULL, S_OK, Q_NULLPTR); + return QueueEvent(MEStreamSinkRequestSample, GUID_NULL, S_OK, nullptr); } return S_OK; } @@ -354,7 +354,7 @@ public: HRESULT __stdcall SetCurrentMediaType(IMFMediaType *type) override { - if (FAILED(IsMediaTypeSupported(type, Q_NULLPTR))) + if (FAILED(IsMediaTypeSupported(type, nullptr))) return MF_E_INVALIDREQUEST; m_type = type; @@ -490,7 +490,7 @@ public: scheduleSetActive(false); - return m_stream->QueueEvent(MEStreamSinkStopped, GUID_NULL, S_OK, Q_NULLPTR); + return m_stream->QueueEvent(MEStreamSinkStopped, GUID_NULL, S_OK, nullptr); } HRESULT __stdcall OnClockPause(MFTIME systemTime) override @@ -499,7 +499,7 @@ public: scheduleSetActive(false); - return m_stream->QueueEvent(MEStreamSinkPaused, GUID_NULL, S_OK, Q_NULLPTR); + return m_stream->QueueEvent(MEStreamSinkPaused, GUID_NULL, S_OK, nullptr); } HRESULT __stdcall OnClockRestart(MFTIME systemTime) override @@ -508,7 +508,7 @@ public: scheduleSetActive(true); - return m_stream->QueueEvent(MEStreamSinkStarted, GUID_NULL, S_OK, Q_NULLPTR); + return m_stream->QueueEvent(MEStreamSinkStarted, GUID_NULL, S_OK, nullptr); } HRESULT __stdcall OnClockSetRate(MFTIME systemTime, float rate) override diff --git a/src/plugins/winrt/qwinrtmediaplayercontrol.cpp b/src/plugins/winrt/qwinrtmediaplayercontrol.cpp index 9fd48fd76..de6b3418e 100644 --- a/src/plugins/winrt/qwinrtmediaplayercontrol.cpp +++ b/src/plugins/winrt/qwinrtmediaplayercontrol.cpp @@ -541,7 +541,7 @@ QWinRTMediaPlayerControl::QWinRTMediaPlayerControl(IMFMediaEngineClassFactory *f d->seekable = false; d->hasAudio = false; d->hasVideo = false; - d->videoRenderer = Q_NULLPTR; + d->videoRenderer = nullptr; d->notifier = Make<MediaEngineNotify>(this, d); HRESULT hr; @@ -796,7 +796,7 @@ void QWinRTMediaPlayerControl::setMedia(const QMediaContent &media, QIODevice *s } // Let Windows handle all other URLs - hr = d->engine->SetSource(Q_NULLPTR); // Resets the byte stream + hr = d->engine->SetSource(nullptr); // Resets the byte stream Q_ASSERT_SUCCEEDED(hr); hr = d->engine->Load(); if (FAILED(hr)) diff --git a/src/plugins/winrt/qwinrtmediaplayerservice.cpp b/src/plugins/winrt/qwinrtmediaplayerservice.cpp index 58149fd33..3253ed188 100644 --- a/src/plugins/winrt/qwinrtmediaplayerservice.cpp +++ b/src/plugins/winrt/qwinrtmediaplayerservice.cpp @@ -65,7 +65,7 @@ QWinRTMediaPlayerService::QWinRTMediaPlayerService(QObject *parent) { Q_D(QWinRTMediaPlayerService); - d->player = Q_NULLPTR; + d->player = nullptr; HRESULT hr = MFStartup(MF_VERSION); Q_ASSERT(SUCCEEDED(hr)); @@ -94,11 +94,11 @@ QMediaControl *QWinRTMediaPlayerService::requestControl(const char *name) } if (qstrcmp(name, QVideoRendererControl_iid) == 0) { if (!d->player) - return Q_NULLPTR; + return nullptr; return d->player->videoRendererControl(); } - return Q_NULLPTR; + return nullptr; } void QWinRTMediaPlayerService::releaseControl(QMediaControl *control) diff --git a/src/plugins/winrt/qwinrtserviceplugin.cpp b/src/plugins/winrt/qwinrtserviceplugin.cpp index d08a39a5e..286789e4c 100644 --- a/src/plugins/winrt/qwinrtserviceplugin.cpp +++ b/src/plugins/winrt/qwinrtserviceplugin.cpp @@ -55,7 +55,7 @@ QMediaService *QWinRTServicePlugin::create(QString const &key) if (key == QLatin1String(Q_MEDIASERVICE_CAMERA)) return new QWinRTCameraService(this); - return Q_NULLPTR; + return nullptr; } void QWinRTServicePlugin::release(QMediaService *service) diff --git a/src/plugins/winrt/qwinrtvideodeviceselectorcontrol.cpp b/src/plugins/winrt/qwinrtvideodeviceselectorcontrol.cpp index abe10f9a4..41d4693cb 100644 --- a/src/plugins/winrt/qwinrtvideodeviceselectorcontrol.cpp +++ b/src/plugins/winrt/qwinrtvideodeviceselectorcontrol.cpp @@ -124,7 +124,7 @@ struct QWinRTVideoDeviceSelectorControlGlobal IDeviceInformation *device; hr = deviceList->GetAt(i, &device); Q_ASSERT_SUCCEEDED(hr); - onDeviceAdded(Q_NULLPTR, device); + onDeviceAdded(nullptr, device); } // If there is no default device provided by the API, choose the first one |