winrt: Use ComPtr for better ref count tracking

Just forwarding the content of a ComPtr is potentially dangerous.

Change-Id: I4f3dfa04a5844d299a5653e31a4a0d1e1b86f9b5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Maurice Kalinowski
2016-04-14 10:45:21 +02:00
committed by Maurice Kalinowski
parent f97e1988a6
commit 5206d37836
3 changed files with 6 additions and 4 deletions

View File

@@ -147,7 +147,7 @@ int QWinRTCameraImageCaptureControl::capture(const QString &fileName)
Q_D(QWinRTCameraImageCaptureControl);
++d->currentCaptureId;
IMediaCapture *capture = d->cameraControl->handle();
ComPtr<IMediaCapture> capture = d->cameraControl->handle();
if (!capture) {
emit error(d->currentCaptureId, QCameraImageCapture::NotReadyError, tr("Camera not ready"));
return -1;