From 5edf4ed878bbe933e6ff0023cce8808b1dcff6c0 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 6 May 2009 11:39:30 +1000 Subject: Doc --- src/declarative/qml/qmlcomponent.cpp | 2 +- src/declarative/qml/qmlengine.cpp | 11 ++++++++++- src/declarative/qml/qmlmetaproperty.cpp | 26 +++++++++++++------------- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index f0d23ee..b257d5f 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -264,7 +264,7 @@ QmlComponent::QmlComponent(QmlEngine *engine, const QUrl &url, QObject *parent) /*! Create a QmlComponent from the given QML \a data and give it the - specified \a parent. If \a url is provided, it is used to set + specified \a parent and \a engine. If \a url is provided, it is used to set the component name, and to provide a base path for items resolved by this component. diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index bcea325..4d6b64f 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -410,6 +410,9 @@ QmlEngine::~QmlEngine() /*! Clears the engine's internal component cache. + + Normally the QmlEngine caches components loaded from qml files. This method + clears this cache and forces the component to be reloaded. */ void QmlEngine::clearComponentCache() { @@ -600,7 +603,11 @@ QNetworkAccessManager *QmlEngine::networkAccessManager() const } /*! - Returns the QmlContext for the \a object. + Returns the QmlContext for the \a object, or 0 if no context has been set. + + When the QmlEngine instantiates a QObject, the context is set automatically. + + \sa qmlContext() */ QmlContext *QmlEngine::contextForObject(const QObject *object) { @@ -616,6 +623,8 @@ QmlContext *QmlEngine::contextForObject(const QObject *object) Sets the QmlContext for the \a object to \a context. If the \a object already has a context, a warning is output, but the context is not changed. + + When the QmlEngine instantiates a QObject, the context is set automatically. */ void QmlEngine::setContextForObject(QObject *object, QmlContext *context) { diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp index 14a45dc..40c9b0e 100644 --- a/src/declarative/qml/qmlmetaproperty.cpp +++ b/src/declarative/qml/qmlmetaproperty.cpp @@ -265,13 +265,13 @@ QmlMetaProperty::QmlMetaProperty(const QmlMetaProperty &other) This enum specifies a category of QML property. - \value Unknown - \value InvalidProperty - \value Bindable - \value List - \value QmlList - \value Object - \value Normal + \value Unknown The category is unknown. This will never be returned from propertyCategory() + \value InvalidProperty The property is invalid. + \value Bindable The property is a QmlBindableValue. + \value List The property is a QList pointer + \value QmlList The property is a QmlList pointer + \value Object The property is a QObject derived type pointer + \value Normal The property is none of the above. */ /*! @@ -279,12 +279,12 @@ QmlMetaProperty::QmlMetaProperty(const QmlMetaProperty &other) This enum specifies a type of QML property. - \value Invalid - \value Property - \value SignalProperty - \value Signal - \value Default - \value Attached + \value Invalid The property is invalid. + \value Property The property is a regular Qt property. + \value SignalProperty The property is a signal property. + \value Signal The property is a signal. + \value Default The property is the default property. + \value Attached The property is an attached property. */ /*! -- cgit v0.12