aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2020-02-19 00:15:27 +0100
committerTopi Reiniƶ <topi.reinio@qt.io>2020-02-20 08:59:03 +0000
commit410f835a40bda737c8933fe630251752fba2ba4f (patch)
tree6b8540d6dbd8f19a135731017e070baeb2803b94
parent8f86214856753a2cb58507336ef6ea98b580094c (diff)
Doc: Fix documentation warnings for Qt QML
Fixes: QTBUG-82313 Change-Id: I7c2f30411ab8011254d7c232c87cb12a39761bda Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r--src/qml/doc/snippets/qml/qml-documents/Images.qml2
-rw-r--r--src/qml/doc/src/cppintegration/definetypes.qdoc2
-rw-r--r--src/qml/doc/src/qmlfunctions.qdoc19
-rw-r--r--src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc9
-rw-r--r--src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc2
-rw-r--r--src/qml/qml/qqmlincubator.cpp4
-rw-r--r--src/qml/qml/qqmltypeloader.cpp2
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions.cpp12
8 files changed, 27 insertions, 25 deletions
diff --git a/src/qml/doc/snippets/qml/qml-documents/Images.qml b/src/qml/doc/snippets/qml/qml-documents/Images.qml
index 80a4d95fbb..fc9fa60282 100644
--- a/src/qml/doc/snippets/qml/qml-documents/Images.qml
+++ b/src/qml/doc/snippets/qml/qml-documents/Images.qml
@@ -81,4 +81,4 @@ Item {
}
property LabeledImage selectedImage: before
}
-// Images.qml
+//! [document]
diff --git a/src/qml/doc/src/cppintegration/definetypes.qdoc b/src/qml/doc/src/cppintegration/definetypes.qdoc
index f66dc44383..cbbbd9ba58 100644
--- a/src/qml/doc/src/cppintegration/definetypes.qdoc
+++ b/src/qml/doc/src/cppintegration/definetypes.qdoc
@@ -307,7 +307,7 @@ merged with the original target class when used from within QML. For example:
The \c leftMargin property is a new property added to an existing C++ type, \l
QLineEdit, without modifying its source code.
-The \l {QML_EXTENDED(extended)} macro is for registering extended types. The
+The QML_EXTENDED(extended) macro is for registering extended types. The
argument is the name of another class to be used as extension.
An extension class is a regular QObject, with a constructor that takes a QObject
diff --git a/src/qml/doc/src/qmlfunctions.qdoc b/src/qml/doc/src/qmlfunctions.qdoc
index 63c28d7aa7..04d907f168 100644
--- a/src/qml/doc/src/qmlfunctions.qdoc
+++ b/src/qml/doc/src/qmlfunctions.qdoc
@@ -27,7 +27,7 @@
/*!
\macro QML_ELEMENT
- \related QQmlEngine
+ \relates QQmlEngine
Declares the enclosing type or namespace to be available in QML, using its
class or namespace name as the QML element name.
@@ -45,10 +45,10 @@
\endcode
You can use the build system to register the type in the type namespace
- "com.mycompany.qmlcomponents" with major version \c 1 by specifying the
+ \e {com.mycompany.qmlcomponents} with major version \c 1 by specifying the
following in your project file:
- \code
+ \badcode
CONFIG += qmltypes
QML_IMPORT_NAME = com.mycompany.qmlcomponents
QML_IMPORT_MAJOR_VERSION = 1
@@ -74,7 +74,7 @@
/*!
\macro QML_NAMED_ELEMENT(name)
- \related QQmlEngine
+ \relates QQmlEngine
Declares the enclosing type or namespace to be available in QML, using \a name
as the element name. Otherwise behaves the same as QML_ELEMENT.
@@ -209,7 +209,7 @@
{attached property} to other types. This takes effect if the type
is exposed to QML using a \l QML_ELEMENT or \l QML_NAMED_ELEMENT() macro.
- \sa QML_ELEMENT, QML_NAMED_ELEMENT(), qmlAtachedPropertiesObject(),
+ \sa QML_ELEMENT, QML_NAMED_ELEMENT(), qmlAttachedPropertiesObject(),
{Providing Attached Properties}
*/
@@ -234,7 +234,7 @@
\l QML_ATTACHED(), or \l QML_EXTENDED() macros in the enclosing C++ type do
not apply to the enclosing type but instead to \a FOREIGN_TYPE. The enclosing
type still needs to be registered with the
- \l {The Meta-Object System}{meta object system} using a \l G_GADGET or
+ \l {The Meta-Object System}{meta object system} using a \l Q_GADGET or
\l Q_OBJECT macro.
This is useful for registering types that cannot be amended to add the macros,
@@ -278,13 +278,14 @@
This will cause any QML which attempts to use the "Game" type to produce an
error message:
- \code
+
+ \badcode
fun.qml: Get back to work, slacker!
Game {
^
\endcode
- Using this technique, you only need a \l G_GADGET struct to customize the error
+ Using this technique, you only need a \l Q_GADGET struct to customize the error
message, not a full-blown \l QObject. Without \l QML_UNCREATABLE(),
\l QML_UNAVAILABLE still results in a more specific error message than the usual
"is not a type" for completely unknown types.
@@ -905,7 +906,7 @@
*/
/*!
- \fn int qmlRegisterSingletonInstance(const char *uri, int versionMajor, int versionMinor, const char *typeName, QObject* cppObject)
+ \fn template<typename T> auto qmlRegisterSingletonInstance(const char *uri, int versionMajor, int versionMinor, const char *typeName, T *cppObject)
\relates QQmlEngine
\since 5.14
diff --git a/src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc b/src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc
index 2eaedf8f9b..a4119ff793 100644
--- a/src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc
+++ b/src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc
@@ -125,10 +125,11 @@ component <component name> : BaseType {
Inside the file which declares the inline component, the type can be referenced
simply by its name.
-\snippet src/qml/doc/snippets/qml/qml-documents/Images.qml document
+\snippet qml/qml-documents/Images.qml document
In other files, it has to be prefixed with the name of its containing component.
-\snippet src/qml/doc/snippets/qml/qml-documents/LabeledImageBox.qml document
+
+\snippet qml/qml-documents/LabeledImageBox.qml document
\note Inline components don't share their scope with the component they are
declared in. In the following example, when \c A.MyInlineComponent in file
@@ -137,8 +138,8 @@ an id in B.qml.
It is therefore advisable not to reference objects in an inline component
which are not part of it.
-\snippet src/qml/doc/snippets/qml/qml-documents/A.qml document
-\snippet src/qml/doc/snippets/qml/qml-documents/B.qml document
+\snippet qml/qml-documents/A.qml document
+\snippet qml/qml-documents/B.qml document
\note Inline components cannot be nested.
diff --git a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
index 832d9a9e26..ecfef2e04f 100644
--- a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
+++ b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
@@ -684,7 +684,7 @@ Required properties play a special role in model-view-delegate code:
If the delegate of a view has required properties whose names match with
the role names of the view's model, then those properties will be initialized
with the model's corresponding values.
-For more information, visit the \l{Models and Views in QtQuick} page.
+For more information, visit the \l{Models and Views in Qt Quick} page.
\sa {QQmlComponent::createWithInitialProperties}, {QQmlApplicationEngine::setInitialProperties}
and {QQuickView::setInitialProperties} for ways to initialize required properties from C++.
diff --git a/src/qml/qml/qqmlincubator.cpp b/src/qml/qml/qqmlincubator.cpp
index 4911cd2879..0ad013e90b 100644
--- a/src/qml/qml/qqmlincubator.cpp
+++ b/src/qml/qml/qqmlincubator.cpp
@@ -722,8 +722,8 @@ bool QQmlIncubatorPrivate::hadRequiredProperties() const
}
/*!
-Stores a mapping from property names to initial values with which the incubated
-component will be initialized
+Stores a mapping from property names to initial values, contained in
+\a initialProperties, with which the incubated component will be initialized.
\sa QQmlComponent::setInitialProperties
\since 5.15
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
index 983592fccf..f910fe1140 100644
--- a/src/qml/qml/qqmltypeloader.cpp
+++ b/src/qml/qml/qqmltypeloader.cpp
@@ -393,7 +393,7 @@ QQmlEngine *QQmlTypeLoader::engine() const
return m_engine;
}
-/*!
+/*! \internal
Call the initializeEngine() method on \a iface. Used by QQmlImportDatabase to ensure it
gets called in the correct thread.
*/
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
index 70134bad35..02628a9810 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
@@ -809,7 +809,7 @@ parameter may be any of the possible format values as described for
\l{QtQml::Qt::formatDateTime()}{Qt.formatDateTime()}.
If \a format is not specified, \a date is formatted using
-\l {QLocale::FormatType::ShortFormat}{Locale.ShortFormat} using the
+\l {QLocale::FormatType}{Locale.ShortFormat} using the
default locale.
\sa Locale
@@ -838,7 +838,7 @@ possible format values as described for
\l{QtQml::Qt::formatDateTime()}{Qt.formatDateTime()}.
If \a format is not specified, \a time is formatted using
-\l {QLocale::FormatType::ShortFormat}{Locale.ShortFormat} using the default locale.
+\l {QLocale::FormatType}{Locale.ShortFormat} using the default locale.
\sa Locale
*/
@@ -863,13 +863,13 @@ ReturnedValue QtObject::method_formatTime(const FunctionObject *b, const Value *
\qmlmethod string Qt::formatDateTime(datetime dateTime, variant format, variant localeFormatOption)
Returns a string representation of \a dateTime, optionally formatted using
-\a format.
+\a format and \a localeFormatOption.
The \a dateTime parameter may be a JavaScript \c Date object, a \l{date}{date}
property, a QDate, QTime, or QDateTime value.
If \a format is not provided, \a dateTime is formatted using
-\l {QLocale::FormatType::ShortFormat}{Locale.ShortFormat} using the
+\l {QLocale::FormatType}{Locale.ShortFormat} using the
default locale. Otherwise, \a format should be either:
\list
@@ -880,9 +880,9 @@ default locale. Otherwise, \a format should be either:
\endlist
If \a format specifies a locale object, \dateTime is formatted
-with \li{QLocale::toString}. In this case, localeFormatType can hold a value
+with \l{QLocale::toString}. In this case, \a localeFormatOption can hold a value
of type \l {QLocale::FormatType} to further tune the formatting. If none is
-provided, \l {QLocale::FormatType::ShortFormat}{Locale.ShortFormat} is used.
+provided, \l {QLocale::FormatType}{Locale.ShortFormat} is used.
If \a format specifies a format string, it should use the following expressions
to specify the date: