aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSze Howe Koh <szehowe.koh@gmail.com>2014-03-20 21:57:03 +0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-28 02:42:57 +0100
commit2341b58b76aea5c627cc656a2406256bac710227 (patch)
tree7a997207fd36eaecaf8953a50ce557cea12cc778
parent37fbfa4dc0de361eb05bc34077bdb8eab1113aad (diff)
Doc: Document signals (not handlers) under \qmlattachedsignal
- They're not "attached properties" either. - Append the handler names to the end of the corresponding signal doc. - Update descriptions and links Task-number: QTBUG-35846 Change-Id: I54e93187b3209546ec344a20e0482c98d7f14109 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
-rw-r--r--src/qml/doc/src/javascript/expressions.qdoc4
-rw-r--r--src/qml/qml/qqmlcomponent.cpp16
-rw-r--r--src/quick/items/qquickdrag.cpp14
-rw-r--r--src/quick/items/qquickgridview.cpp16
-rw-r--r--src/quick/items/qquicklistview.cpp18
5 files changed, 40 insertions, 28 deletions
diff --git a/src/qml/doc/src/javascript/expressions.qdoc b/src/qml/doc/src/javascript/expressions.qdoc
index 02ca20cd28..c33daf7acc 100644
--- a/src/qml/doc/src/javascript/expressions.qdoc
+++ b/src/qml/doc/src/javascript/expressions.qdoc
@@ -327,8 +327,8 @@ instances - can use this attached property. If there is more than one
\c onCompleted() handler to execute at startup, they are run sequentially in
an undefined order.
-Likewise, the \l {Component::onDestruction} handler definitions are triggered
-on component destruction.
+Likewise, every \c Component will emit a \l {Component::destruction}{destruction()}
+signal just before being destroyed.
*/
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index f0e737516b..39a7d8905d 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -263,14 +263,14 @@ V8_DEFINE_EXTENSION(QQmlComponentExtension, componentExtension);
*/
/*!
- \qmlattachedsignal Component::onCompleted()
+ \qmlattachedsignal Component::completed()
Emitted after component "startup" has completed. This can be used to
execute script code at startup, once the full QML environment has been
established.
- The \c {Component::onCompleted} attached property can be declared on
- any object. The order of running the \c onCompleted scripts is
+ The corresponding handler is \c onCompleted. It can be declared on
+ any object. The order of running the \c onCompleted handlers is
undefined.
\qml
@@ -284,16 +284,16 @@ V8_DEFINE_EXTENSION(QQmlComponentExtension, componentExtension);
*/
/*!
- \qmlattachedsignal Component::onDestruction()
+ \qmlattachedsignal Component::destruction()
Emitted as the component begins destruction. This can be used to undo
- work done in the onCompleted signal, or other imperative code in your
- application.
+ work done in response to the \l {completed}{completed()} signal, or other
+ imperative code in your application.
- The \c {Component::onDestruction} attached property can be declared on
+ The corresponding handler is \c onDestruction. It can be declared on
any object. However, it applies to the destruction of the component as
a whole, and not the destruction of the specific object. The order of
- running the \c onDestruction scripts is undefined.
+ running the \c onDestruction handlers is undefined.
\qml
Rectangle {
diff --git a/src/quick/items/qquickdrag.cpp b/src/quick/items/qquickdrag.cpp
index 605c485f6b..48c794a1be 100644
--- a/src/quick/items/qquickdrag.cpp
+++ b/src/quick/items/qquickdrag.cpp
@@ -694,17 +694,21 @@ void QQuickDragAttached::cancel()
}
/*!
- \qmlattachedsignal QtQuick::Drag::onDragStarted()
+ \qmlattachedsignal QtQuick::Drag::dragStarted()
- This handler is called when a drag is started with the \l startDrag method
+ This signal is emitted when a drag is started with the \l startDrag() method
or when it is started automatically using the \l dragType property.
+
+ The corresponding handler is \c onDragStarted.
*/
/*!
- \qmlattachedsignal QtQuick::Drag::onDragFinished(DropAction action)
+ \qmlattachedsignal QtQuick::Drag::dragFinished(DropAction action)
+
+ This signal is emitted when a drag finishes and the drag was started with the
+ \l startDrag() method or started automatically using the \l dragType property.
- This handler is called when a drag finishes and the drag was started with the
- \l startDrag method or started automatically using the \l dragType property.
+ The corresponding handler is \c onDragFinished.
*/
Qt::DropAction QQuickDragAttachedPrivate::startDrag(Qt::DropActions supportedActions)
diff --git a/src/quick/items/qquickgridview.cpp b/src/quick/items/qquickgridview.cpp
index d56b5d0cab..82658c73fc 100644
--- a/src/quick/items/qquickgridview.cpp
+++ b/src/quick/items/qquickgridview.cpp
@@ -1305,16 +1305,20 @@ void QQuickGridView::setHighlightFollowsCurrentItem(bool autoHighlight)
*/
/*!
- \qmlattachedsignal QtQuick::GridView::onAdd()
- This attached handler is called immediately after an item is added to the view.
+ \qmlattachedsignal QtQuick::GridView::add()
+ This attached signal is emitted immediately after an item is added to the view.
+
+ The corresponding handler is \c onAdd.
*/
/*!
- \qmlattachedsignal QtQuick::GridView::onRemove()
- This attached handler is called immediately before an item is removed from the view.
+ \qmlattachedsignal QtQuick::GridView::remove()
+ This attached signal is emitted immediately before an item is removed from the view.
If a \l remove transition has been specified, it is applied after
- this signal handler is called, providing that delayRemove is false.
+ this signal is handled, providing that \l delayRemove is false.
+
+ The corresponding handler is \c onRemove.
*/
@@ -1797,7 +1801,7 @@ void QQuickGridView::setSnapMode(SnapMode mode)
populated, or when the view's \l model changes. (In those cases, the \l populate transition is
applied instead.) Additionally, this transition should \e not animate the height of the new item;
doing so will cause any items beneath the new item to be laid out at the wrong position. Instead,
- the height can be animated within a \l {ListView::onAdd}{ListView.onAdd} in the delegate.
+ the height can be animated within the \l {add}{onAdd} handler in the delegate.
\sa addDisplaced, populate, ViewTransition
*/
diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp
index 786468bbfd..1c6d5acfa2 100644
--- a/src/quick/items/qquicklistview.cpp
+++ b/src/quick/items/qquicklistview.cpp
@@ -1837,19 +1837,23 @@ QQuickListView::~QQuickListView()
*/
/*!
- \qmlattachedsignal QtQuick::ListView::onAdd()
- This attached signal handler is called immediately after an item is added to the view.
+ \qmlattachedsignal QtQuick::ListView::add()
+ This attached signal is emitted immediately after an item is added to the view.
If an \l add transition is specified, it is applied immediately after
- this signal handler is called.
+ this signal is handled.
+
+ The corresponding handler is \c onAdd.
*/
/*!
- \qmlattachedsignal QtQuick::ListView::onRemove()
- This attached handler is called immediately before an item is removed from the view.
+ \qmlattachedsignal QtQuick::ListView::remove()
+ This attached signal is emitted immediately before an item is removed from the view.
If a \l remove transition has been specified, it is applied after
- this signal handler is called, providing that delayRemove is false.
+ this signal is handled, providing that \l delayRemove is false.
+
+ The corresponding handler is \c onRemove.
*/
/*!
@@ -2499,7 +2503,7 @@ void QQuickListView::setSnapMode(SnapMode mode)
populated, or when the view's \l model changes. (In those cases, the \l populate transition is
applied instead.) Additionally, this transition should \e not animate the height of the new item;
doing so will cause any items beneath the new item to be laid out at the wrong position. Instead,
- the height can be animated within \l onAdd in the delegate.
+ the height can be animated within the \l {add}{onAdd} handler in the delegate.
\sa addDisplaced, populate, ViewTransition
*/