summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@qt.io>2020-01-15 15:28:33 +0100
committerLeena Miettinen <riitta-leena.miettinen@qt.io>2020-01-17 14:27:15 +0100
commit1cc4b7e28bf9f8f684bf17ed30a822aa6d1c6735 (patch)
tree689215c8378e99a4ba16733fc694ebb69b99016a
parentee50d9a38689c2d56d530ef41f94ee0f6844b571 (diff)
Doc: Explain that the camera consumes power in Camera.LoadedState
Fix the QDoc code to use \value for \qmlproperty enumeration. Remove empty lines within \value on the C++ side, because they break the docs. Fixes: QTBUG-81364 Change-Id: I5b26e4ec9d86292d63d70c3751865ca26ff13fa0 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
-rw-r--r--src/imports/multimedia/qdeclarativecamera.cpp50
-rw-r--r--src/multimedia/camera/qcamera.cpp19
2 files changed, 33 insertions, 36 deletions
diff --git a/src/imports/multimedia/qdeclarativecamera.cpp b/src/imports/multimedia/qdeclarativecamera.cpp
index 91bda2ea2..400dea4b5 100644
--- a/src/imports/multimedia/qdeclarativecamera.cpp
+++ b/src/imports/multimedia/qdeclarativecamera.cpp
@@ -489,34 +489,26 @@ void QDeclarativeCamera::setCaptureMode(QDeclarativeCamera::CaptureMode mode)
/*!
\qmlproperty enumeration QtMultimedia::Camera::cameraState
- This property holds the camera object's current state, which can be one of the following:
-
- \table
- \header \li Value \li Description
- \row \li UnloadedState
- \li The initial camera state, with the camera not loaded.
- The camera capabilities (with the exception of supported capture modes)
- are unknown. This state saves the most power, but takes the longest
- time to be ready for capture.
-
- While the supported settings are unknown in this state,
- you can still set the camera capture settings like codec,
- resolution, or frame rate.
-
- \row \li LoadedState
- \li The camera is loaded and ready to be configured.
-
- In the Idle state you can query camera capabilities,
- set capture resolution, codecs, and so on.
-
- The viewfinder is not active in the loaded state.
-
- \row \li ActiveState
- \li In the active state the viewfinder frames are available
- and the camera is ready for capture.
- \endtable
-
- The default camera state is ActiveState.
+ This property holds the camera object's current state. The default camera
+ state is \c ActiveState.
+
+ \value Camera.UnloadedState
+ The initial camera state, with the camera not loaded.
+ The camera capabilities (with the exception of supported capture modes)
+ are unknown. This state saves the most power, but takes the longest
+ time to be ready for capture.
+ While the supported settings are unknown in this state,
+ you can still set the camera capture settings like codec,
+ resolution, or frame rate.
+ \value Camera.LoadedState
+ The camera is loaded and ready to be configured.
+ In this state you can query camera capabilities,
+ set capture resolution, codecs, and so on.
+ The viewfinder is not active in the loaded state.
+ The camera consumes power in this state.
+ \value Camera.ActiveState
+ In the active state, the viewfinder frames are available
+ and the camera is ready for capture.
*/
QDeclarativeCamera::State QDeclarativeCamera::cameraState() const
{
@@ -617,6 +609,8 @@ void QDeclarativeCamera::start()
Stops the camera, but leaves the camera
stack loaded.
+
+ In this state, the camera still consumes power.
*/
void QDeclarativeCamera::stop()
{
diff --git a/src/multimedia/camera/qcamera.cpp b/src/multimedia/camera/qcamera.cpp
index e23193f11..00c387083 100644
--- a/src/multimedia/camera/qcamera.cpp
+++ b/src/multimedia/camera/qcamera.cpp
@@ -838,6 +838,10 @@ void QCamera::start()
/*!
Stops the camera.
The camera state is changed from QCamera::ActiveState to QCamera::LoadedState.
+
+ In this state, the camera still consumes power.
+
+ \sa unload(), QCamera::UnloadedState
*/
void QCamera::stop()
{
@@ -1078,23 +1082,22 @@ void QCamera::unlock()
/*!
\enum QCamera::State
+
+ This enum holds the current state of the camera.
+
\value UnloadedState
- The initial camera state, with camera not loaded,
- the camera capabilities except of supported capture modes
+ The initial camera state, with camera not loaded.
+ The camera capabilities, except supported capture modes,
are unknown.
-
While the supported settings are unknown in this state,
it's allowed to set the camera capture settings like codec,
resolution, or frame rate.
-
\value LoadedState
The camera is loaded and ready to be configured.
-
- In the Idle state it's allowed to query camera capabilities,
+ In this state it's allowed to query camera capabilities,
set capture resolution, codecs, etc.
-
The viewfinder is not active in the loaded state.
-
+ The camera consumes power in the loaded state.
\value ActiveState
In the active state as soon as camera is started
the viewfinder displays video frames and the