diff options
author | Topi Reinio <topi.reinio@qt.io> | 2020-07-15 14:15:25 +0200 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2020-07-15 20:35:27 +0200 |
commit | f68e83d7634c929bef57fc534861768bb9785c74 (patch) | |
tree | c91ab0a68744b29461778c49bda059e310069e7b /tests/auto/qdoc/generatedoutput/testdata | |
parent | 87fdeb7f99e08c5f670298fafa7e5a19ce8e71b8 (diff) |
qdoc: Introduce \required command and handle REQUIRED for QML properties
Q_PROPERTY macro now supports the REQUIRED keyword. This is relevant for
QML types, where the type cannot be instatiated without declaring all
required properties.
Make QDoc parse the REQUIRED keyword, set associated QML property as
required, and introduce a new command, \required, to do this explicitly
in the docs.
Likewise in QML visitor, check for the 'required' keyword for properties.
[ChangeLog][qdoc] Support marking QML properties as required in the
generated documentation.
Fixes: QTBUG-85597
Change-Id: Ib8a25c5ebc1183812aec6e672b557c8fb1196741
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'tests/auto/qdoc/generatedoutput/testdata')
-rw-r--r-- | tests/auto/qdoc/generatedoutput/testdata/qml/DocTest.qml | 2 | ||||
-rw-r--r-- | tests/auto/qdoc/generatedoutput/testdata/qml/type.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qdoc/generatedoutput/testdata/qml/DocTest.qml b/tests/auto/qdoc/generatedoutput/testdata/qml/DocTest.qml index f9eeb49d1..9b4c975f2 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/qml/DocTest.qml +++ b/tests/auto/qdoc/generatedoutput/testdata/qml/DocTest.qml @@ -64,7 +64,7 @@ Item { } \endqml */ - property string name + required property string name /*! Whether the test is active. diff --git a/tests/auto/qdoc/generatedoutput/testdata/qml/type.cpp b/tests/auto/qdoc/generatedoutput/testdata/qml/type.cpp index 2ae71fece..439738342 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/qml/type.cpp +++ b/tests/auto/qdoc/generatedoutput/testdata/qml/type.cpp @@ -52,6 +52,7 @@ /*! \qmlproperty string QDoc.Test::Type::name + \required \brief Name of the Test. */ |