From 9fdf7be30568e2298cdc7a911cbbfbed0453d31f Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 6 Jun 2012 12:04:39 +1000 Subject: [PATCH] Better documentation for subclassing QQuickItem Task-number: QTBUG-26025 Change-Id: Ia0fadf54ee8924f9892bc567c107efc4dca80628 Reviewed-by: Martin Jones --- src/quick/items/qquickitem.cpp | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index d184ba0..f5ab703 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -3028,6 +3028,8 @@ void QQuickItem::setClip(bool c) This function is called to handle this item's changes in geometry from \a oldGeometry to \a newGeometry. If the two geometries are the same, it doesn't do anything. + + Derived classes must call the base class method within their implementation. */ void QQuickItem::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) { @@ -3641,6 +3643,11 @@ QQmlListProperty QQuickItem::transform() QQuickItemPrivate::transform_clear); } +/*! + \reimp + Derived classes should call the base class method before adding their own action to + perform at classBegin. +*/ void QQuickItem::classBegin() { Q_D(QQuickItem); @@ -3653,6 +3660,11 @@ void QQuickItem::classBegin() d->extra->layer->classBegin(); } +/*! + \reimp + Derived classes should call the base class method before adding their own actions to + perform at componentComplete. +*/ void QQuickItem::componentComplete() { Q_D(QQuickItem); -- 1.7.2.5