summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Bennett <nicholas.bennett@qt.io>2022-01-11 16:41:57 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-01-12 08:17:53 +0000
commit1e2a788d733a686d1c6a71fba37a1f0f1be4d389 (patch)
tree2bb4b52f709f152e21ea4aa4933705910fe47b8b
parent5225837908bdaef0c63795e789fa6baf79fae9f7 (diff)
Docs: Fix some QML Properties listed as methods
Updated AudioDevice and CameraDevice QML comments. Fixes: QTBUG-99661 Change-Id: Ieb022ef3abbe4c76fe84d91f8751cc4ae85f6bcf Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit a5ef0916fdbd6bf58bba2492296ae338e8862df2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/multimedia/audio/qaudiodevice.cpp32
-rw-r--r--src/multimedia/camera/qcameradevice.cpp32
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.
*/
/*!