From 7d196d3558321623de2de0b6c145239dd475b749 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Tue, 20 Apr 2010 16:39:38 +1000 Subject: doc --- doc/src/declarative/globalobject.qdoc | 2 ++ doc/src/declarative/qdeclarativesecurity.qdoc | 4 ++-- src/declarative/graphicsitems/qdeclarativeitem.cpp | 23 +++++++++++----------- src/declarative/qml/qdeclarativecontext.cpp | 6 ++++++ src/declarative/qml/qdeclarativeengine.cpp | 5 ++++- src/declarative/util/qdeclarativeview.cpp | 1 + 6 files changed, 27 insertions(+), 14 deletions(-) diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc index c41c344..d84754b 100644 --- a/doc/src/declarative/globalobject.qdoc +++ b/doc/src/declarative/globalobject.qdoc @@ -288,6 +288,8 @@ of their use. \section1 XMLHttpRequest +\target XMLHttpRequest + QML script supports the XMLHttpRequest object, which can be used to asynchronously obtain data from over a network. diff --git a/doc/src/declarative/qdeclarativesecurity.qdoc b/doc/src/declarative/qdeclarativesecurity.qdoc index 290d78f..91d6d87 100644 --- a/doc/src/declarative/qdeclarativesecurity.qdoc +++ b/doc/src/declarative/qdeclarativesecurity.qdoc @@ -72,7 +72,7 @@ A non-exhaustive list of the ways you could shoot yourself in the foot is: \list \i Using \c import to import QML or JavaScript you do not control. BAD \i Using \l Loader to import QML you do not control. BAD - \i Using \l{XMLHttpRequest()}{XMLHttpRequest} to load data you do not control and executing it. BAD + \i Using \l{XMLHttpRequest}{XMLHttpRequest} to load data you do not control and executing it. BAD \endlist However, the above does not mean that you have no use for the network transparency of QML. @@ -81,7 +81,7 @@ There are many good and useful things you \e can do: \list \i Create \l Image elements with source URLs of any online images. GOOD \i Use XmlListModel to present online content. GOOD - \i Use \l{XMLHttpRequest()}{XMLHttpRequest} to interact with online services. GOOD + \i Use \l{XMLHttpRequest}{XMLHttpRequest} to interact with online services. GOOD \endlist The only reason this page is necessary at all is that JavaScript, when run in a \e{web browser}, diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 37c7923..d19967a 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -275,17 +275,6 @@ QDeclarativeContents::QDeclarativeContents() : m_x(0), m_y(0), m_width(0), m_hei { } -/*! - \qmlproperty real Item::childrenRect.x - \qmlproperty real Item::childrenRect.y - \qmlproperty real Item::childrenRect.width - \qmlproperty real Item::childrenRect.height - - The childrenRect properties allow an item access to the geometry of its - children. This property is useful if you have an item that needs to be - sized to fit its children. -*/ - QRectF QDeclarativeContents::rectF() const { return QRectF(m_x, m_y, m_width, m_height); @@ -1457,6 +1446,18 @@ QDeclarativeItem *QDeclarativeItem::parentItem() const } /*! + \qmlproperty real Item::childrenRect.x + \qmlproperty real Item::childrenRect.y + \qmlproperty real Item::childrenRect.width + \qmlproperty real Item::childrenRect.height + + The childrenRect properties allow an item access to the geometry of its + children. This property is useful if you have an item that needs to be + sized to fit its children. +*/ + + +/*! \qmlproperty list Item::children \qmlproperty list Item::resources diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp index 2041e0a..ae4223e 100644 --- a/src/declarative/qml/qdeclarativecontext.cpp +++ b/src/declarative/qml/qdeclarativecontext.cpp @@ -208,6 +208,12 @@ QDeclarativeContext::~QDeclarativeContext() d->data->destroy(); } +/*! + Returns whether the context is valid. + + To be valid, a context must have a engine, and it's contextObject(), if any, + must not have been deleted. +*/ bool QDeclarativeContext::isValid() const { Q_D(const QDeclarativeContext); diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 9cd6b3c..dc80ac4 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -2031,7 +2031,8 @@ QStringList QDeclarativeEngine::pluginPathList() const /*! Sets the list of directories where the engine searches for - native plugins for imported modules (referenced in the \c qmldir file). + native plugins for imported modules (referenced in the \c qmldir file) + to \a paths. By default, the list contains only \c ., i.e. the engine searches in the directory of the \c qmldir file itself. @@ -2049,6 +2050,8 @@ void QDeclarativeEngine::setPluginPathList(const QStringList &paths) Imports the plugin named \a filePath with the \a uri provided. Returns true if the plugin was successfully imported; otherwise returns false. + On failure and if non-null, *\a errorString will be set to a message describing the failure. + The plugin has to be a Qt plugin which implements the QDeclarativeExtensionPlugin interface. */ bool QDeclarativeEngine::importPlugin(const QString &filePath, const QString &uri, QString *errorString) diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp index 5cfa0e8..62d913c 100644 --- a/src/declarative/util/qdeclarativeview.cpp +++ b/src/declarative/util/qdeclarativeview.cpp @@ -599,6 +599,7 @@ void QDeclarativeView::timerEvent(QTimerEvent* e) } } +/*! \reimp */ bool QDeclarativeView::eventFilter(QObject *watched, QEvent *e) { if (watched == d->root && d->resizeMode == SizeViewToRootObject) { -- cgit v0.12