From ca4d0be72c35cd693cab61b35831f8392a44e09c Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 5 May 2009 10:39:11 +0200 Subject: qdoc: Corrected some qdoc warnings. --- src/declarative/fx/qfxitem.cpp | 47 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 84dc484..380dd53 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -476,6 +476,10 @@ void QFxItem::setItemParent(QFxItem *parent) \property QFxItem::moveToParent Playing around with view2view transitions. */ + +/*! + \internal + */ void QFxItem::moveToParent(QFxItem *parent) { if (parent && itemParent()) { @@ -792,6 +796,9 @@ QFxContents *QFxItem::contents() \property QFxItem::qmlItem */ +/*! \fn QFxItem *QFxItem::qmlItem() const + \internal + */ QFxItem *QFxItem::qmlItem() const { Q_D(const QFxItem); @@ -807,6 +814,13 @@ QFxItem *QFxItem::qmlItem() const dynamically set; otherwise an empty string is returned. */ +/*! \fn void QFxItem::qmlChanged() + This signal is emitted whenever the item's dynamic QML + string changes. + + \sa setQml() + */ + /*! \property QFxItem::qml This property holds the dynamic QML for the item. @@ -858,7 +872,14 @@ void QFxItem::setQml(const QString &qml) } } +/*! \fn void QFxItem::newChildCreated(const QString &url, QScriptValue v) + This signal is emitted with the \a url and the script value \a v, + when a new child is created. + */ +/*! + \internal + */ void QFxItem::qmlLoaded() { Q_D(QFxItem); @@ -1007,6 +1028,11 @@ void QFxItem::qmlLoaded() \endtable */ +/*! + 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. + */ void QFxItem::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) { @@ -1138,6 +1164,13 @@ void QFxItem::setFlipHorizontally(bool v) setFlip((QSimpleCanvasItem::Flip)(flip() & ~HorizontalFlip)); } +/*! \fn void QFxItem::keyPress(QFxKeyEvent *event) + This signal is emitted by keyPressEvent() for the \a event. + */ + +/*! \fn void QFxItem::keyRelease(QFxKeyEvent *event) + This signal is emitted by keyReleaseEvent() for the \a event. + */ /*! \reimp @@ -1440,6 +1473,12 @@ void QFxItem::setBaselineOffset(int offset) \endtable */ +/*! \fn void QFxItem::rotationChanged() + This signal is emitted when the rotation property is changed. + + \sa setRotation() + */ + /*! \property QFxItem::rotation This property holds the rotation of the item in degrees. @@ -1592,12 +1631,20 @@ void QFxItem::setOpacity(qreal v) emit opacityChanged(); } +/*! + Returns a value indicating whether the mouse should + remain with this item. + */ bool QFxItem::keepMouseGrab() const { Q_D(const QFxItem); return d->_keepMouse; } +/*! + The flag indicating whether the mouse should remain + with this item is set to \a keep. + */ void QFxItem::setKeepMouseGrab(bool keep) { Q_D(QFxItem); -- cgit v0.12 From 4416bb70d751ff31818823f79d3d7ed3a3d94929 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 29 Apr 2009 15:05:56 +0200 Subject: Removed dependency of QmlContext to QmlCompiledComponent Store component url directly in context, instead of referencing the associated QmlCompiledComponent. In addition, allow to explicitly set the base url to a context. This is needed for Bauhaus. --- src/declarative/qml/qmlcomponent.cpp | 3 +-- src/declarative/qml/qmlcontext.cpp | 29 +++++++++++++++++++---------- src/declarative/qml/qmlcontext.h | 2 ++ src/declarative/qml/qmlcontext_p.h | 3 ++- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index 72d4e08..0a56636 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -451,8 +451,7 @@ QObject *QmlComponent::beginCreate(QmlContext *context) QmlContext *ctxt = new QmlContext(context, 0); - static_cast(ctxt->d_ptr)->component = d->cc; - static_cast(ctxt->d_ptr)->component->addref(); + static_cast(ctxt->d_ptr)->url = d->cc->url; ctxt->activate(); QmlVME vme; diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp index 30857ad..6330eda 100644 --- a/src/declarative/qml/qmlcontext.cpp +++ b/src/declarative/qml/qmlcontext.cpp @@ -42,7 +42,6 @@ #include #include #include -#include #include #include @@ -54,7 +53,7 @@ QT_BEGIN_NAMESPACE QmlContextPrivate::QmlContextPrivate() - : parent(0), engine(0), highPriorityCount(0), component(0) + : parent(0), engine(0), highPriorityCount(0) { } @@ -232,8 +231,6 @@ QmlContext::QmlContext(QmlContext *parentContext, QObject *parent) */ QmlContext::~QmlContext() { - Q_D(QmlContext); - if (d->component) d->component->release(); } @@ -344,7 +341,7 @@ QmlContext *QmlContext::activeContext() simply returned. If there is no containing component, an empty URL is returned. - \sa QmlEngine::componentUrl() + \sa QmlEngine::componentUrl(), setBaseUrl */ QUrl QmlContext::resolvedUrl(const QUrl &src) { @@ -352,14 +349,14 @@ QUrl QmlContext::resolvedUrl(const QUrl &src) if (src.isRelative()) { if (ctxt) { while(ctxt) { - if (ctxt->d_func()->component) + if(ctxt->d_func()->url.isValid()) break; else ctxt = ctxt->parentContext(); } if (ctxt) - return ctxt->d_func()->component->url.resolved(src); + return ctxt->d_func()->url.resolved(src); } return QUrl(); } else { @@ -373,7 +370,7 @@ QUrl QmlContext::resolvedUrl(const QUrl &src) \l {QmlEngine::nameSpacePaths()} {namespace paths} of the context's engine, returning the resolved URL. - \sa QmlEngine::componentUrl() + \sa QmlEngine::componentUrl(), setBaseUrl */ QUrl QmlContext::resolvedUri(const QUrl &src) { @@ -381,14 +378,14 @@ QUrl QmlContext::resolvedUri(const QUrl &src) if (src.isRelative()) { if (ctxt) { while(ctxt) { - if (ctxt->d_func()->component) + if (ctxt->d_func()->url.isValid()) break; else ctxt = ctxt->parentContext(); } if (ctxt) - return ctxt->d_func()->engine->componentUrl(src, ctxt->d_func()->component->url); + return ctxt->d_func()->engine->componentUrl(src, ctxt->d_func()->url); } return QUrl(); } else { @@ -396,6 +393,18 @@ QUrl QmlContext::resolvedUri(const QUrl &src) } } +/*! + Explicitly sets the url both resolveUri() and resolveUrl() will use for relative references. + + Calling this function will override the url of the containing component used by default. + + \sa resolvedUrl, resolvedUri +*/ +void QmlContext::setBaseUrl(const QUrl &baseUrl) +{ + d_func()->url = baseUrl; +} + void QmlContext::objectDestroyed(QObject *object) { Q_D(QmlContext); diff --git a/src/declarative/qml/qmlcontext.h b/src/declarative/qml/qmlcontext.h index 9e3b6d8..39d565a 100644 --- a/src/declarative/qml/qmlcontext.h +++ b/src/declarative/qml/qmlcontext.h @@ -80,6 +80,8 @@ public: QUrl resolvedUri(const QUrl &); QUrl resolvedUrl(const QUrl &); + void setBaseUrl(const QUrl &); + private Q_SLOTS: void objectDestroyed(QObject *); diff --git a/src/declarative/qml/qmlcontext_p.h b/src/declarative/qml/qmlcontext_p.h index 3772885..40848fb 100644 --- a/src/declarative/qml/qmlcontext_p.h +++ b/src/declarative/qml/qmlcontext_p.h @@ -69,7 +69,8 @@ public: QScriptValueList scopeChain; - QmlCompiledComponent *component; + QUrl url; + void init(); void dump(); -- cgit v0.12 From 1fb2457414749daef08935a36534991bca5ad562 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 4 May 2009 15:04:17 +0200 Subject: Doc fix - Image::src has been renamed to QFxImage::source see commit 94a69804 --- src/declarative/fx/qfximage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp index 838da30..106d551 100644 --- a/src/declarative/fx/qfximage.cpp +++ b/src/declarative/fx/qfximage.cpp @@ -135,7 +135,7 @@ QFxImage::~QFxImage() This property contains the image currently being displayed by this item, which may be an empty pixmap if nothing is currently displayed. If this - property is set, the src property will be unset. This property is intended + property is set, the source property will be unset. This property is intended to be used only in C++, not in QML. */ QPixmap QFxImage::pixmap() const @@ -790,7 +790,7 @@ QFxImage::Status QFxImage::status() const } /*! - \qmlproperty string Image::src + \qmlproperty string Image::source Image can handle any image format supported by Qt, loaded from any URL scheme supported by Qt. -- cgit v0.12 From 7771d6e6bc015e7341b6790f1c1e8800a778025a Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Mon, 4 May 2009 15:19:45 +0200 Subject: Fixed qml's variant and color animations when started without transition When the 'from' field is not set, it was not updated after running an animation twice. Now the color and variant animations behave as the numeric one, updating the 'from' value at the start of each run. Reviewed-by: Michael Brasser --- src/declarative/util/qmlanimation.cpp | 36 +++++++++++++++++++++-------------- src/declarative/util/qmlanimation_p.h | 17 +++++++++++++---- 2 files changed, 35 insertions(+), 18 deletions(-) diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index 4b8ce4e..08a7a28 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -703,9 +703,10 @@ QColor QmlColorAnimation::from() const void QmlColorAnimation::setFrom(const QColor &f) { Q_D(QmlColorAnimation); - if (d->fromValue.isValid() && f == d->fromValue) + if (d->fromIsDefined && f == d->fromValue) return; d->fromValue = f; + d->fromIsDefined = f.isValid(); emit fromChanged(f); } @@ -726,9 +727,10 @@ QColor QmlColorAnimation::to() const void QmlColorAnimation::setTo(const QColor &t) { Q_D(QmlColorAnimation); - if (d->toValue.isValid() && t == d->toValue) + if (d->toIsDefined && t == d->toValue) return; d->toValue = t; + d->toIsDefined = t.isValid(); emit toChanged(t); } @@ -860,9 +862,13 @@ void QmlColorAnimation::transition(QmlStateActions &actions, (!target() || target() == obj)) { objs.insert(obj); Action myAction = action; - if (d->fromValue.isValid()) + + if (d->fromIsDefined) { myAction.fromValue = QVariant(d->fromValue); - if (d->toValue.isValid()) + } else { + myAction.fromValue = QVariant(); + } + if (d->toIsDefined) myAction.toValue = QVariant(d->toValue); modified << action.property; @@ -877,7 +883,7 @@ void QmlColorAnimation::transition(QmlStateActions &actions, Action myAction; myAction.property = QmlMetaProperty(obj, props.at(jj)); - if (d->fromValue.isValid()) + if (d->fromIsDefined) myAction.fromValue = QVariant(d->fromValue); myAction.toValue = QVariant(d->toValue); @@ -898,7 +904,7 @@ QVariantAnimation::Interpolator QmlColorAnimationPrivate::colorInterpolator = 0; void QmlColorAnimationPrivate::valueChanged(qreal v) { if (!fromSourced) { - if (!fromValue.isValid()) { + if (!fromIsDefined) { fromValue = qvariant_cast(property.read()); } fromSourced = true; @@ -1993,9 +1999,10 @@ QVariant QmlVariantAnimation::from() const void QmlVariantAnimation::setFrom(const QVariant &f) { Q_D(QmlVariantAnimation); - if (d->from.isValid() && f == d->from) + if (d->fromIsDefined && f == d->from) return; d->from = f; + d->fromIsDefined = f.isValid(); emit fromChanged(f); } @@ -2017,9 +2024,10 @@ QVariant QmlVariantAnimation::to() const void QmlVariantAnimation::setTo(const QVariant &t) { Q_D(QmlVariantAnimation); - if (d->to.isValid() && t == d->to) + if (d->toIsDefined && t == d->to) return; d->to = t; + d->toIsDefined = t.isValid(); emit toChanged(t); } @@ -2109,7 +2117,7 @@ QList *QmlVariantAnimation::exclude() void QmlVariantAnimationPrivate::valueChanged(qreal r) { if (!fromSourced) { - if (!from.isValid()) { + if (!fromIsDefined) { from = property.read(); } fromSourced = true; @@ -2138,7 +2146,7 @@ void QmlVariantAnimation::prepare(QmlMetaProperty &p) d->property = d->userProperty; d->convertVariant(d->to, (QVariant::Type)d->property.propertyType()); - if (d->from.isValid()) + if (d->fromIsDefined) d->convertVariant(d->from, (QVariant::Type)d->property.propertyType()); d->fromSourced = false; @@ -2198,12 +2206,12 @@ void QmlVariantAnimation::transition(QmlStateActions &actions, objs.insert(obj); Action myAction = action; - if (d->from.isValid()) { + if (d->fromIsDefined) { myAction.fromValue = d->from; } else { myAction.fromValue = QVariant(); } - if (d->to.isValid()) + if (d->toIsDefined) myAction.toValue = d->to; d->convertVariant(myAction.fromValue, (QVariant::Type)myAction.property.propertyType()); @@ -2216,13 +2224,13 @@ void QmlVariantAnimation::transition(QmlStateActions &actions, } } - if (d->to.isValid() && target() && !objs.contains(target())) { + if (d->toIsDefined && target() && !objs.contains(target())) { QObject *obj = target(); for (int jj = 0; jj < props.count(); ++jj) { Action myAction; myAction.property = QmlMetaProperty(obj, props.at(jj)); - if (d->from.isValid()) { + if (d->fromIsDefined) { d->convertVariant(d->from, (QVariant::Type)myAction.property.propertyType()); myAction.fromValue = d->from; } diff --git a/src/declarative/util/qmlanimation_p.h b/src/declarative/util/qmlanimation_p.h index 4fcaa47..06b7c08 100644 --- a/src/declarative/util/qmlanimation_p.h +++ b/src/declarative/util/qmlanimation_p.h @@ -203,7 +203,8 @@ class QmlColorAnimationPrivate : public QmlAbstractAnimationPrivate Q_DECLARE_PUBLIC(QmlColorAnimation); public: QmlColorAnimationPrivate() - : QmlAbstractAnimationPrivate(), fromSourced(false), ca(0), value(this, &QmlColorAnimationPrivate::valueChanged) + : QmlAbstractAnimationPrivate(), fromSourced(false), fromIsDefined(false), toIsDefined(false), + ca(0), value(this, &QmlColorAnimationPrivate::valueChanged) { if (!colorInterpolator) colorInterpolator = QVariantAnimationPrivate::getInterpolator(QVariant::Color); @@ -213,11 +214,16 @@ public: QString easing; + QColor fromValue; + QColor toValue; + QList filter; QList exclude; + bool fromSourced; - QColor fromValue; - QColor toValue; + bool fromIsDefined; + bool toIsDefined; + QmlTimeLineValueAnimator *ca; virtual void valueChanged(qreal); @@ -350,7 +356,8 @@ class QmlVariantAnimationPrivate : public QmlAbstractAnimationPrivate Q_DECLARE_PUBLIC(QmlVariantAnimation); public: QmlVariantAnimationPrivate() - : QmlAbstractAnimationPrivate(), fromSourced(false), va(0), value(this, &QmlVariantAnimationPrivate::valueChanged) {} + : QmlAbstractAnimationPrivate(), fromSourced(false), fromIsDefined(false), toIsDefined(false), + va(0), value(this, &QmlVariantAnimationPrivate::valueChanged) {} void init(); @@ -364,6 +371,8 @@ public: QList exclude; bool fromSourced; + bool fromIsDefined; + bool toIsDefined; QmlTimeLineValueAnimator *va; virtual void valueChanged(qreal); -- cgit v0.12 From a2159968f0e8787e393bf56dfcec8df84599c34f Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 5 May 2009 12:25:43 +0200 Subject: Remove declaration of loadError from QmlDomDocument Implementation was already removed in c7a0cae7deb6e31c --- src/declarative/qml/qmldom.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/declarative/qml/qmldom.h b/src/declarative/qml/qmldom.h index 74ed27c..daca888 100644 --- a/src/declarative/qml/qmldom.h +++ b/src/declarative/qml/qmldom.h @@ -73,7 +73,6 @@ public: int version() const; QList errors() const; - QString loadError() const; bool load(QmlEngine *, const QByteArray &); QByteArray save() const; -- cgit v0.12 From 4eaf3807b6010f1b50e194d44907818ed223b925 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 5 May 2009 13:22:27 +0200 Subject: qdoc: Corrected some qdoc warnings. --- src/declarative/qml/qmlcomponent.cpp | 26 +++++++++++++------ src/declarative/qml/qmlcustomparser.cpp | 44 +++++++++++++++++++-------------- src/declarative/qml/qmlmetaproperty.cpp | 40 +++++++++++++++++++++++++++--- 3 files changed, 79 insertions(+), 31 deletions(-) diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index 72d4e08..816260d 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -173,6 +173,9 @@ QmlComponent::~QmlComponent() d->cc->release(); } +/*! + Returns the component's current \l{QmlComponent::Status} {status}. + */ QmlComponent::Status QmlComponent::status() const { Q_D(const QmlComponent); @@ -235,7 +238,8 @@ bool QmlComponent::isLoading() const */ /*! - Create a QmlComponent with no data. Set setData(). + Create a QmlComponent with no data and give it the specified + \a engine and \a parent. Set the data with setData(). */ QmlComponent::QmlComponent(QmlEngine *engine, QObject *parent) : QObject(*(new QmlComponentPrivate), parent) @@ -245,7 +249,10 @@ QmlComponent::QmlComponent(QmlEngine *engine, QObject *parent) } /*! - Create a QmlComponent from the given \a url. + Create a QmlComponent from the given \a url and give it the + specified \a parent and \a engine. + + \sa loadUrl() */ QmlComponent::QmlComponent(QmlEngine *engine, const QUrl &url, QObject *parent) : QObject(*(new QmlComponentPrivate), parent) @@ -256,9 +263,12 @@ QmlComponent::QmlComponent(QmlEngine *engine, const QUrl &url, QObject *parent) } /*! - Create a QmlComponent from the given QML \a data. If provided, \a url - is used to set the component name, and to provide a base path for items - resolved by this component. + 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 + the component name, and to provide a base path for items resolved + by this component. + + \sa setData() */ QmlComponent::QmlComponent(QmlEngine *engine, const QByteArray &data, const QUrl &url, QObject *parent) : QObject(*(new QmlComponentPrivate), parent) @@ -283,9 +293,9 @@ QmlComponent::QmlComponent(QmlEngine *engine, QmlCompiledComponent *cc, int star } /*! - Sets the QmlComponent to use the given QML \a data. If provided, - \a url is used to set the component name, and to provide a base path - for items resolved by this component. + Sets the QmlComponent to use the given QML \a data. 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. */ void QmlComponent::setData(const QByteArray &data, const QUrl &url) { diff --git a/src/declarative/qml/qmlcustomparser.cpp b/src/declarative/qml/qmlcustomparser.cpp index 544c469..06035b0 100644 --- a/src/declarative/qml/qmlcustomparser.cpp +++ b/src/declarative/qml/qmlcustomparser.cpp @@ -52,11 +52,11 @@ using namespace QmlParser; \brief The QmlCustomParser class allows you to add new arbitrary types to QML. \internal - By subclassing QmlCustomParser, you can add an XML parser for building a - particular type. + By subclassing QmlCustomParser, you can add an XML parser for + building a particular type. - The subclass must implement compile() and create(), and define itself in - the meta type system with one of the macros: + The subclass must implement compile() and create(), and define + itself in the meta type system with one of the macros: \code QML_DEFINE_CUSTOM_PARSER(Name, parserClass) @@ -67,33 +67,39 @@ using namespace QmlParser; \endcode */ -/*! +/* \fn QByteArray QmlCustomParser::compile(QXmlStreamReader& reader, bool *ok) - Upon entry to this function, \a reader is positioned on a QXmlStreamReader::StartElement - with the name specified when the class was defined with the QML_DEFINE_CUSTOM_PARSER macro. + Upon entry to this function, \a reader is positioned on a + QXmlStreamReader::StartElement with the name specified when the + class was defined with the QML_DEFINE_CUSTOM_PARSER macro. - The custom parser must consume tokens from \a reader until the EndElement matching the - initial start element is reached, or until error. + The custom parser must consume tokens from \a reader until the + EndElement matching the initial start element is reached, or until + error. On return, \c *ok indicates success. - The returned QByteArray contains data meaningful only to the custom parser; the - type engine will pass this same data to create() when making an instance of the data. + The returned QByteArray contains data meaningful only to the + custom parser; the type engine will pass this same data to + create() when making an instance of the data. - The QByteArray may be cached between executions of the system, so it must contain - correctly-serialized data (not, for example, pointers to stack objects). + The QByteArray may be cached between executions of the system, so + it must contain correctly-serialized data (not, for example, + pointers to stack objects). */ -/*! +/* \fn QVariant QmlCustomParser::create(const QByteArray &data) - This function returns a QVariant containing the value represented by \a data, which - is a block of data previously returned by a call to compile(). + This function returns a QVariant containing the value represented + by \a data, which is a block of data previously returned by a call + to compile(). - If the compile is for a type, the variant should be a pointer to the - correctly-named QObject subclass (i.e. the one defined by QML_DEFINE_TYPE for - the same-named type as this custom parser is defined for). + If the compile is for a type, the variant should be a pointer to + the correctly-named QObject subclass (i.e. the one defined by + QML_DEFINE_TYPE for the same-named type as this custom parser is + defined for). */ QmlCustomParserNode diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp index 1a511eb..14a45dc 100644 --- a/src/declarative/qml/qmlmetaproperty.cpp +++ b/src/declarative/qml/qmlmetaproperty.cpp @@ -261,6 +261,33 @@ QmlMetaProperty::QmlMetaProperty(const QmlMetaProperty &other) } /*! + \enum QmlMetaProperty::PropertyCategory + + This enum specifies a category of QML property. + + \value Unknown + \value InvalidProperty + \value Bindable + \value List + \value QmlList + \value Object + \value Normal + */ + +/*! + \enum QmlMetaProperty::Type + + This enum specifies a type of QML property. + + \value Invalid + \value Property + \value SignalProperty + \value Signal + \value Default + \value Attached +*/ + +/*! Returns the property category. */ QmlMetaProperty::PropertyCategory QmlMetaProperty::propertyCategory() const @@ -472,13 +499,17 @@ QStringList QmlMetaProperty::properties(QObject *obj) } /*! - Return the name of this property. + Return the name of this QML property. */ QString QmlMetaProperty::name() const { return d->name; } +/*! + Returns the \l{QMetaProperty} {Qt property} associated with + this QML property. + */ const QMetaProperty &QmlMetaProperty::property() const { return d->prop; @@ -1037,9 +1068,10 @@ quint32 QmlMetaProperty::save() const } /*! - Restore a QmlMetaProperty from a previously saved id. \a obj must be the - same object as used in the previous call to QmlMetaProperty::save(). Only - the bottom 24-bits are used, the high bits can be set to any value. + Restore a QmlMetaProperty from a previously saved \a id. + \a obj must be the same object as used in the previous call + to QmlMetaProperty::save(). Only the bottom 24-bits are + used, the high bits can be set to any value. */ void QmlMetaProperty::restore(quint32 id, QObject *obj) { -- cgit v0.12 From 7495bee56210a99b04f6c5497dc4ef8487fe3362 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 5 May 2009 15:22:30 +0200 Subject: qdoc: Corrected some qdoc warnings. --- src/declarative/fx/qfxparticles.cpp | 8 -------- src/declarative/qml/qmlcontext.cpp | 12 +++++++----- src/declarative/qml/qmlengine.cpp | 15 +++++++++++++-- src/declarative/qml/qmlpropertyvaluesource.cpp | 7 +++++-- src/declarative/util/qfxview.cpp | 8 +++++--- 5 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/declarative/fx/qfxparticles.cpp b/src/declarative/fx/qfxparticles.cpp index b1f4f56..8535a73 100644 --- a/src/declarative/fx/qfxparticles.cpp +++ b/src/declarative/fx/qfxparticles.cpp @@ -113,8 +113,6 @@ QML_DEFINE_TYPE(QFxParticleMotion,ParticleMotion); \brief The QFxParticleMotion class is the base class for particle motion. This class causes the particles to remain static. - - \sa QFxParticles */ /*! @@ -165,8 +163,6 @@ void QFxParticleMotion::destroy(QFxParticle &particle) \class QFxParticleMotionLinear \ingroup group_effects \brief The QFxParticleMotionLinear class moves the particles linearly. - - \sa QFxParticles */ QML_DEFINE_TYPE(QFxParticleMotionLinear,ParticleMotionLinear); @@ -189,8 +185,6 @@ void QFxParticleMotionLinear::advance(QFxParticle &p, int interval) \class QFxParticleMotionGravity \ingroup group_effects \brief The QFxParticleMotionGravity class moves the particles towards a point. - - \sa QFxParticles */ QML_DEFINE_TYPE(QFxParticleMotionGravity,ParticleMotionGravity); @@ -281,8 +275,6 @@ Rect { The particles will continue roughly in the original direction, however will randomly drift to each side. - - \sa QFxParticles */ /*! diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp index 6330eda..68453c3 100644 --- a/src/declarative/qml/qmlcontext.cpp +++ b/src/declarative/qml/qmlcontext.cpp @@ -341,7 +341,7 @@ QmlContext *QmlContext::activeContext() simply returned. If there is no containing component, an empty URL is returned. - \sa QmlEngine::componentUrl(), setBaseUrl + \sa QmlEngine::componentUrl(), setBaseUrl() */ QUrl QmlContext::resolvedUrl(const QUrl &src) { @@ -370,7 +370,7 @@ QUrl QmlContext::resolvedUrl(const QUrl &src) \l {QmlEngine::nameSpacePaths()} {namespace paths} of the context's engine, returning the resolved URL. - \sa QmlEngine::componentUrl(), setBaseUrl + \sa QmlEngine::componentUrl(), setBaseUrl() */ QUrl QmlContext::resolvedUri(const QUrl &src) { @@ -394,11 +394,13 @@ QUrl QmlContext::resolvedUri(const QUrl &src) } /*! - Explicitly sets the url both resolveUri() and resolveUrl() will use for relative references. + Explicitly sets the url both resolveUri() and resolveUrl() will + use for relative references to \a baseUrl. - Calling this function will override the url of the containing component used by default. + Calling this function will override the url of the containing + component used by default. - \sa resolvedUrl, resolvedUri + \sa resolvedUrl(), resolvedUri() */ void QmlContext::setBaseUrl(const QUrl &baseUrl) { diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index f8b7ad6..bcea325 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -408,6 +408,9 @@ QmlEngine::~QmlEngine() { } +/*! + Clears the engine's internal component cache. + */ void QmlEngine::clearComponentCache() { Q_D(QmlEngine); @@ -582,8 +585,8 @@ void QmlEngine::setNetworkAccessManager(QNetworkAccessManager *network) } /*! - Returns the common QNetworkAccessManager used by all QML elements instantiated by - this engine. + Returns the common QNetworkAccessManager used by all QML elements + instantiated by this engine. The default implements no caching, cookiejar, etc., just a default QNetworkAccessManager. @@ -596,6 +599,9 @@ QNetworkAccessManager *QmlEngine::networkAccessManager() const return d->networkAccessManager; } +/*! + Returns the QmlContext for the \a object. + */ QmlContext *QmlEngine::contextForObject(const QObject *object) { QObjectPrivate *priv = QObjectPrivate::get(const_cast(object)); @@ -606,6 +612,11 @@ QmlContext *QmlEngine::contextForObject(const QObject *object) return data?data->context:0; } +/*! + 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. + */ void QmlEngine::setContextForObject(QObject *object, QmlContext *context) { QObjectPrivate *priv = QObjectPrivate::get(object); diff --git a/src/declarative/qml/qmlpropertyvaluesource.cpp b/src/declarative/qml/qmlpropertyvaluesource.cpp index 44e1952..4770929 100644 --- a/src/declarative/qml/qmlpropertyvaluesource.cpp +++ b/src/declarative/qml/qmlpropertyvaluesource.cpp @@ -59,14 +59,17 @@ QmlPropertyValueSource::QmlPropertyValueSource(QObject *parent) { } +/*! + \internal + */ QmlPropertyValueSource::QmlPropertyValueSource(QObjectPrivate &dd, QObject *parent) : QObject(dd, parent) { } /*! - Set the target \a property for the value source. This method will be called - by the QML engine when assigning a value source. + Set the target \a property for the value source. This method will + be called by the QML engine when assigning a value source. The default implementation does nothing. */ diff --git a/src/declarative/util/qfxview.cpp b/src/declarative/util/qfxview.cpp index f71b87e..1315f19 100644 --- a/src/declarative/util/qfxview.cpp +++ b/src/declarative/util/qfxview.cpp @@ -348,7 +348,7 @@ void QFxView::continueExecute() } /*! \fn void QFxView::sceneResized(QSize size) - This signal is emitted when the view is resized. + This signal is emitted when the view is resized to \a size. */ /*! @@ -458,7 +458,8 @@ void QFxView::resizeEvent(QResizeEvent *e) } /*! \fn void QFxView::focusInEvent(QFocusEvent *e) - This virtual function does nothing in this class. + This virtual function does nothing with the event \a e + in this class. */ void QFxView::focusInEvent(QFocusEvent *) { @@ -467,7 +468,8 @@ void QFxView::focusInEvent(QFocusEvent *) /*! \fn void QFxView::focusOutEvent(QFocusEvent *e) - This virtual function does nothing in this class. + This virtual function does nothing with the event \a e + in this class. */ void QFxView::focusOutEvent(QFocusEvent *) { -- cgit v0.12 From f98a10ed41f181252d83e9cebaa3772d556f6266 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Tue, 5 May 2009 17:21:43 +0200 Subject: Inserted the semicolon at the end of the previous token. --- src/declarative/qml/parser/javascript.g | 5 ++++- src/declarative/qml/parser/javascriptparser.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/declarative/qml/parser/javascript.g b/src/declarative/qml/parser/javascript.g index 5482392..ec81a7a 100644 --- a/src/declarative/qml/parser/javascript.g +++ b/src/declarative/qml/parser/javascript.g @@ -2690,12 +2690,15 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ; tk.dval = yylval; tk.loc = yylloc; + yylloc = yyprevlloc; + yylloc.offset += yylloc.length; + yylloc.startColumn += yylloc.length; yylloc.length = 0; const QString msg = QString::fromUtf8("Missing `;'"); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, - yyprevlloc.startLine, yyprevlloc.startColumn, msg)); + yylloc.startLine, yylloc.startColumn, msg)); first_token = &token_buffer[0]; last_token = &token_buffer[1]; diff --git a/src/declarative/qml/parser/javascriptparser.cpp b/src/declarative/qml/parser/javascriptparser.cpp index 185a824..897f0ce 100644 --- a/src/declarative/qml/parser/javascriptparser.cpp +++ b/src/declarative/qml/parser/javascriptparser.cpp @@ -1547,12 +1547,15 @@ case 312: { tk.dval = yylval; tk.loc = yylloc; + yylloc = yyprevlloc; + yylloc.offset += yylloc.length; + yylloc.startColumn += yylloc.length; yylloc.length = 0; const QString msg = QString::fromUtf8("Missing `;'"); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, - yyprevlloc.startLine, yyprevlloc.startColumn, msg)); + yylloc.startLine, yylloc.startColumn, msg)); first_token = &token_buffer[0]; last_token = &token_buffer[1]; -- cgit v0.12