From 36aaf5c58e016d858d93558eb15015f0b712cbe4 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 22 Sep 2021 11:43:09 +0200 Subject: Doc fixes for mediaMetaData MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use \qmlbasictype for value types, otherwise they are not visible in the generated documentation. Use lower case name as it is a value type and exported that way. Fix some signatures to be QML/JS compatible and not show the C++ types. Change-Id: I47270e95f865acb6c6da6f82bea85dabcc8d1c56 Reviewed-by: Topi Reiniƶ Reviewed-by: Piotr Srebrny (cherry picked from commit 302c31f27812d6adecdb291797bef8cf771f08d0) Reviewed-by: Qt Cherry-pick Bot --- src/multimedia/playback/qmediaplayer.cpp | 6 +++--- src/multimedia/qmediametadata.cpp | 22 +++++++++++----------- src/multimedia/recording/qmediarecorder.cpp | 4 +++- src/multimediaquick/Video.qml | 4 ++-- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp index f46ed261a..fdb486538 100644 --- a/src/multimedia/playback/qmediaplayer.cpp +++ b/src/multimedia/playback/qmediaplayer.cpp @@ -676,7 +676,7 @@ QAudioOutput *QMediaPlayer::audioOutput() const audio tracks the \l{language}{MediaMetaData::Language} is usually the most important property. - \sa MediaMetaData + \sa mediaMetaData */ /*! @@ -701,7 +701,7 @@ QList QMediaPlayer::audioTracks() const The metadata holds properties describing the individual tracks. - \sa MediaMetaData + \sa mediaMetaData */ /*! @@ -726,7 +726,7 @@ QList QMediaPlayer::videoTracks() const subtitle tracks the \l{language}{MediaMetaData::Language} is usually the most important property. - \sa MediaMetaData + \sa mediaMetaData */ /*! diff --git a/src/multimedia/qmediametadata.cpp b/src/multimedia/qmediametadata.cpp index 7c81f3610..bee821fbd 100644 --- a/src/multimedia/qmediametadata.cpp +++ b/src/multimedia/qmediametadata.cpp @@ -108,7 +108,7 @@ QT_BEGIN_NAMESPACE */ /*! - \qmltype MediaMetaData + \qmlbasictype mediaMetaData \inqmlmodule QtMultimedia \since 6.2 \instantiates QMediaMetaData @@ -216,21 +216,21 @@ QT_BEGIN_NAMESPACE */ /*! - \qmlmethod QVariant QtMultimedia::MediaMetaData::value(QMediaMetaData::Key key) + \qmlmethod variant QtMultimedia::mediaMetaData::value(QMediaMetaData::Key key) Returns the meta data value for Key \a key, or a null QVariant if no meta-data for the key is available. */ /*! - \fn QVariant QMediaMetaData::value(QMediaMetaData::Key key) const + \fn variant QMediaMetaData::value(QMediaMetaData::Key key) const Returns the meta data value for Key \a key, or a null QVariant is not meta data for the key is available. */ /*! - \qmlmethod bool QtMultimedia::MediaMetaData::isEmpty() + \qmlmethod bool QtMultimedia::mediaMetaData::isEmpty() Returns \c true if the meta data contains no items: otherwise returns \c{false}. */ @@ -240,7 +240,7 @@ QT_BEGIN_NAMESPACE */ /*! - \qmlmethod void QtMultimedia::MediaMetaData::clear() + \qmlmethod void QtMultimedia::mediaMetaData::clear() Removes all data from the MediaMetaData object. */ @@ -250,7 +250,7 @@ QT_BEGIN_NAMESPACE */ /*! - \qmlmethod void QtMultimedia::MediaMetaData::insert(QMediaMetaData::Key k, const QVariant &value) + \qmlmethod void QtMultimedia::mediaMetaData::insert(Key k, variant value) Inserts a \a value into a Key: \a{k}. */ @@ -259,7 +259,7 @@ QT_BEGIN_NAMESPACE Inserts a \a value into a Key: \a{k}. */ /*! - \qmlmethod void QtMultimedia::MediaMetaData::remove(QMediaMetaData::Key k) + \qmlmethod void QtMultimedia::mediaMetaData::remove(Key k) Removes meta data from a Key: \a{k}. */ @@ -269,8 +269,8 @@ QT_BEGIN_NAMESPACE */ /*! - \qmlmethod QList QtMultimedia::MediaMetaData::keys() - Returns a QList of MediaMetaData.Keys. + \qmlmethod list QtMultimedia::mediaMetaData::keys() + Returns a list of MediaMetaData.Keys. */ /*! @@ -279,7 +279,7 @@ QT_BEGIN_NAMESPACE */ /*! - \qmlmethod QString QtMultimedia::MediaMetaData::stringValue(QMediaMetaData::Key key) + \qmlmethod string QtMultimedia::mediaMetaData::stringValue(Key key) Returns the meta data for key \a key as a QString. This is mainly meant to simplify presenting the meta data to a user. @@ -343,7 +343,7 @@ QString QMediaMetaData::stringValue(QMediaMetaData::Key key) const return QString(); } /*! - \qmlmethod QString QtMultimedia::MediaMetaData::metaDataKeyToString(QMediaMetaData::Key key) + \qmlmethod string QtMultimedia::mediaMetaData::metaDataKeyToString(Key key) returns a string representation of \a key that can be used when presenting meta data to users. */ diff --git a/src/multimedia/recording/qmediarecorder.cpp b/src/multimedia/recording/qmediarecorder.cpp index 7c4c50996..e7a0b082c 100644 --- a/src/multimedia/recording/qmediarecorder.cpp +++ b/src/multimedia/recording/qmediarecorder.cpp @@ -518,7 +518,7 @@ void QMediaRecorder::stop() */ /*! - \qmlproperty MediaMetaData QtMultimedia::MediaRecorder::metaData + \qmlproperty mediaMetaData QtMultimedia::MediaRecorder::metaData \brief This property holds meta data associated with the recording. @@ -527,6 +527,8 @@ void QMediaRecorder::stop() \note Ensure that meta-data is assigned correctly by assigning it before starting the recording. + + \sa mediaMetaData */ /*! diff --git a/src/multimediaquick/Video.qml b/src/multimediaquick/Video.qml index f338cf7f3..ca7eb9f9b 100644 --- a/src/multimediaquick/Video.qml +++ b/src/multimediaquick/Video.qml @@ -225,13 +225,13 @@ Item { property alias hasVideo: player.hasVideo /*! - \qmlproperty object Video::metaData + \qmlproperty mediaMetaData Video::metaData This property holds the meta data for the current media. See \l{MediaPlayer::metaData}{MediaPlayer.metaData} for details about each meta data key. - \sa {QMediaMetaData} + \sa {mediaMetaData} */ property alias metaData: player.metaData -- cgit v1.2.3