From 1e2a788d733a686d1c6a71fba37a1f0f1be4d389 Mon Sep 17 00:00:00 2001 From: Nicholas Bennett Date: Tue, 11 Jan 2022 16:41:57 +0200 Subject: Docs: Fix some QML Properties listed as methods Updated AudioDevice and CameraDevice QML comments. Fixes: QTBUG-99661 Change-Id: Ieb022ef3abbe4c76fe84d91f8751cc4ae85f6bcf Reviewed-by: Lars Knoll (cherry picked from commit a5ef0916fdbd6bf58bba2492296ae338e8862df2) Reviewed-by: Qt Cherry-pick Bot --- src/multimedia/audio/qaudiodevice.cpp | 32 +++++++++++++------------------- src/multimedia/camera/qcameradevice.cpp | 32 +++++++++++++------------------- 2 files changed, 26 insertions(+), 38 deletions(-) diff --git a/src/multimedia/audio/qaudiodevice.cpp b/src/multimedia/audio/qaudiodevice.cpp index f2265dcf6..d180d4d53 100644 --- a/src/multimedia/audio/qaudiodevice.cpp +++ b/src/multimedia/audio/qaudiodevice.cpp @@ -183,9 +183,9 @@ bool QAudioDevice::isNull() const } /*! - \qmlmethod string QtMultimedia::audioDevice::id + \qmlproperty string QtMultimedia::audioDevice::id - Returns an identifier for the audio device. + Holds an identifier for the audio device. Device names vary depending on the platform/audio plugin being used. @@ -205,9 +205,9 @@ QByteArray QAudioDevice::id() const } /*! - \qmlmethod string QtMultimedia::audioDevice::description + \qmlmproperty string QtMultimedia::audioDevice::description - Returns a human readable name of the audio device. + Holds a human readable name of the audio device. Use this string to present the device to the user. */ @@ -223,9 +223,9 @@ QString QAudioDevice::description() const } /*! - \qmlmethod bool QtMultimedia::audioDevice::isDefault + \qmlproperty bool QtMultimedia::audioDevice::isDefault - Returns true if this is the default audio device. + Is true if this is the default audio device. */ /*! @@ -336,23 +336,17 @@ QAudioDevice::QAudioDevice(QAudioDevicePrivate *p) */ /*! - \qmlmethod enumeration QtMultimedia::audioDevice::mode + \qmlproperty enumeration QtMultimedia::audioDevice::mode - Tells whether this device is an input or output device. + Holds whether this device is an input or output device. The returned value can be one of the following: - \table - \header - \li Property value - \li Description - \row \li AudioDevice.Null - \li A null device. - \row \li AudioDevice.Input - \li An input device. - \row \li AudioDevice.Output - \li An output device. - \endtable + + \value audioDevice.Null A null device. + \value audioDevice.Input input device. + \value audioDevice.Output An output device. + */ /*! diff --git a/src/multimedia/camera/qcameradevice.cpp b/src/multimedia/camera/qcameradevice.cpp index fe975ded4..760eb1667 100644 --- a/src/multimedia/camera/qcameradevice.cpp +++ b/src/multimedia/camera/qcameradevice.cpp @@ -115,7 +115,7 @@ QCameraFormat::~QCameraFormat() = default; /*! \qmlproperty enumeration QtMultimedia::CameraFormat::pixelFormat - Returns the pixel format. + Holds the pixel format. Most commonly this is either QVideoFrameFormat::Format_Jpeg or QVideoFrameFormat::Format_YUVY but other formats could also be supported by the camera. @@ -312,9 +312,9 @@ bool QCameraDevice::isNull() const } /*! - \qmlmethod string QtMultimedia::cameraDevice::id + \qmlproperty string QtMultimedia::cameraDevice::id - Returns the device id of the camera + Holds he device id of the camera This is a unique ID to identify the camera and may not be human-readable. */ @@ -330,9 +330,9 @@ QByteArray QCameraDevice::id() const } /*! - \qmlmethod bool QtMultimedia::cameraDevice::isDefault + \qmlproperty bool QtMultimedia::cameraDevice::isDefault - Returns true if this is the default camera device. + Is true if this is the default camera device. */ /*! @@ -344,9 +344,9 @@ bool QCameraDevice::isDefault() const } /*! - \qmlmethod string QtMultimedia::cameraDevice::description + \qmlproperty string QtMultimedia::cameraDevice::description - Returns a human readable name of the camera. + Holds a human readable name of the camera. Use this string to present the device to the user. */ @@ -376,23 +376,17 @@ QString QCameraDevice::description() const */ /*! - \qmlmethod enumeration QtMultimedia::cameraDevice::position + \qmlpropertyenumeration QtMultimedia::cameraDevice::position Returns the physical position of the camera on the hardware system. The returned value can be one of the following: - \table - \header - \li Property value - \li Description - \row \li CameraDevice.UnspecifiedPosition - \li The physical positition of the camera is unspecified. - \row \li CameraDevice.FrontFace - \li The camera is on the front of the hardware, facing towards the user. - \row \li CameraDevice.BackFace - \li The camera is on the back of the hardware, facing away from the user. - \endtable + \value cameraDevice.UnspecifiedPosition The camera position is unspecified or unknown. + \value cameraDevice.BackFace The camera is on the back face of the system hardware. For example on a + mobile device, it means it is on the opposite side to that of the screen. + \value cameraDevice.FrontFace The camera is on the front face of the system hardware. For example on a + mobile device, it means it is on the same side as that of the screen. */ /*! -- cgit v1.2.3