aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2017-01-26 15:19:18 +0100
committerTopi Reiniƶ <topi.reinio@qt.io>2017-01-30 10:52:11 +0000
commit65d3a7e15307844a9afcc8fd6cefc8c88079450c (patch)
tree0b50ac1fa073fb0d12e57d0adeda667046a5b98f
parent0a5de1435271155fb3ec7780325e8c33b382da0a (diff)
Doc: Fix documentation warnings
src/qml/jsapi/qjsengine.cpp:524: warning: Undocumented parameter 'metaObject' in QJSEngine::newQMetaObject() src/qml/qml/qqmlengine.cpp:1023: warning: Undocumented parameter 'retCode' in QQmlEngine::exit() src/qml/doc/src/qmlfunctions.qdoc:182: warning: Undocumented parameter 'reason' in qmlRegisterUncreatableMetaObject() src/qml/qml/qqmllist.cpp:393: warning: Undocumented parameter 'at' in QQmlListProperty::QQmlListProperty() src/qml/qml/qqmllist.cpp:393: warning: Undocumented parameter 'count' in QQmlListProperty::QQmlListProperty() src/qml/qml/qqmllist.cpp:402: warning: Undocumented parameter 'at' in QQmlListProperty::QQmlListProperty() src/qml/qml/qqmllist.cpp:402: warning: Undocumented parameter 'count' in QQmlListProperty::QQmlListProperty() src/qml/qml/qqmllist.cpp:402: warning: Undocumented parameter 'append' in QQmlListProperty::QQmlListProperty() src/qml/qml/qqmllist.cpp:402: warning: Undocumented parameter 'clear' in QQmlListProperty::QQmlListProperty() src/quick/items/qquickwindow.cpp:4461: warning: No such parameter 'backend' in QQuickWindow::setSceneGraphBackend() Also do some minor language editing. Change-Id: I2e806d1a77e3c4264d709c27d2bfc4542a782716 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r--src/qml/doc/src/qmlfunctions.qdoc14
-rw-r--r--src/qml/jsapi/qjsengine.cpp2
-rw-r--r--src/qml/qml/qqmlengine.cpp2
-rw-r--r--src/qml/qml/qqmllist.cpp10
-rw-r--r--src/qml/qml/qqmlproperty.cpp12
-rw-r--r--src/quick/items/qquickwindow.cpp4
6 files changed, 28 insertions, 16 deletions
diff --git a/src/qml/doc/src/qmlfunctions.qdoc b/src/qml/doc/src/qmlfunctions.qdoc
index 8b24d19891..8f9ac116d4 100644
--- a/src/qml/doc/src/qmlfunctions.qdoc
+++ b/src/qml/doc/src/qmlfunctions.qdoc
@@ -168,8 +168,9 @@
from \a uri having version number composed from \a versionMajor and
\a versionMinor.
- While the type has a name and a type, it cannot be created, and the
- given error \a reason will result if creation is attempted.
+ While the type has a name and a type, it cannot be created. An error
+ message with the given \a reason is printed if the user attempts to
+ create an instance of this type.
This is useful where the type is only intended for providing attached
properties, enum values or an abstract base class with its extension.
@@ -189,11 +190,14 @@
from \a uri having version number composed from \a versionMajor and
\a versionMinor.
- This function is useful to register Q_NAMESPACE namespaces.
+ An instance of the meta object cannot be created. An error message with
+ the given \a reason is printed if the user attempts to create it.
+
+ This function is useful for registering Q_NAMESPACE namespaces.
Returns the QML type id.
- Example:
+ For example:
\code
namespace MyNamespace {
@@ -209,7 +213,7 @@
qmlRegisterUncreatableMetaObject(MyNamespace::staticMetaObject, "io.qt", 1, 0, "MyNamespace", "Access to enums & flags only");
\endcode
- Now on QML side you can use the registered enums:
+ On the QML side, you can now use the registered enums:
\code
Component.onCompleted: console.log(MyNamespace.Key2)
\endcode
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp
index 4404a5d79f..e4c150057a 100644
--- a/src/qml/jsapi/qjsengine.cpp
+++ b/src/qml/jsapi/qjsengine.cpp
@@ -525,7 +525,7 @@ QJSValue QJSEngine::newQObject(QObject *object)
\since 5.8
Creates a JavaScript object that wraps the given QMetaObject
- The metaObject must outlive the script engine. It is recommended to only
+ The \a metaObject must outlive the script engine. It is recommended to only
use this method with static metaobjects.
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 2a439bde98..c800641f1c 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -1022,7 +1022,7 @@ QQmlEngine::~QQmlEngine()
/*! \fn void QQmlEngine::exit(int retCode)
This signal is emitted when the QML loaded by the engine would like to exit
- from the event loop with the specified return code.
+ from the event loop with the specified return code \a retCode.
\since 5.8
\sa quit()
diff --git a/src/qml/qml/qqmllist.cpp b/src/qml/qml/qqmllist.cpp
index edd93ef03d..2c71293363 100644
--- a/src/qml/qml/qqmllist.cpp
+++ b/src/qml/qml/qqmllist.cpp
@@ -394,8 +394,9 @@ can be very useful while prototyping.
\fn QQmlListProperty::QQmlListProperty(QObject *object, void *data,
CountFunction count, AtFunction at)
-Construct a readonly QQmlListProperty from a set of operation functions. An opaque \a data handle
-may be passed which can be accessed from within the operation functions. The list property
+Construct a readonly QQmlListProperty from a set of operation functions
+\a count and \a at. An opaque \a data handle may be passed which can be
+accessed from within the operation functions. The list property
remains valid while \a object exists.
*/
@@ -404,8 +405,9 @@ remains valid while \a object exists.
CountFunction count, AtFunction at,
ClearFunction clear)
-Construct a QQmlListProperty from a set of operation functions. An opaque \a data handle
-may be passed which can be accessed from within the operation functions. The list property
+Construct a QQmlListProperty from a set of operation functions \a append,
+\a count, \a at, and \a clear. An opaque \a data handle may be passed which
+can be accessed from within the operation functions. The list property
remains valid while \a object exists.
Null pointers can be passed for any function. If any null pointers are passed in, the list
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index c62fef7c3d..0b8eb677cb 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -1400,9 +1400,9 @@ QQmlMetaObject QQmlPropertyPrivate::rawMetaObjectForType(QQmlEnginePrivate *engi
}
/*!
- Sets the property value to \a value and returns true.
- Returns false if the property can't be set because the
- \a value is the wrong type, for example.
+ Sets the property value to \a value. Returns \c true on success, or
+ \c false if the property can't be set because the \a value is the
+ wrong type, for example.
*/
bool QQmlProperty::write(const QVariant &value) const
{
@@ -1417,6 +1417,8 @@ bool QQmlProperty::write(const QVariant &value) const
QQmlProperty p(object, name);
p.write(value);
\endcode
+
+ Returns \c true on success, \c false otherwise.
*/
bool QQmlProperty::write(QObject *object, const QString &name, const QVariant &value)
{
@@ -1433,6 +1435,8 @@ bool QQmlProperty::write(QObject *object, const QString &name, const QVariant &v
QQmlProperty p(object, name, ctxt);
p.write(value);
\endcode
+
+ Returns \c true on success, \c false otherwise.
*/
bool QQmlProperty::write(QObject *object,
const QString &name,
@@ -1453,6 +1457,8 @@ bool QQmlProperty::write(QObject *object,
QQmlProperty p(object, name, engine);
p.write(value);
\endcode
+
+ Returns \c true on success, \c false otherwise.
*/
bool QQmlProperty::write(QObject *object, const QString &name, const QVariant &value,
QQmlEngine *engine)
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index a58912e38f..5edfd619ec 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -4466,8 +4466,8 @@ QSGRendererInterface *QQuickWindow::rendererInterface() const
\note The call to the function must happen before constructing the first
QQuickWindow in the application. It cannot be changed afterwards.
- If \a backend is invalid or an error occurs, the default backend (OpenGL or
- software, depending on the Qt configuration) is used.
+ If the selected backend is invalid or an error occurs, the default backend
+ (OpenGL or software, depending on the Qt configuration) is used.
\since 5.8
*/