diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-12-09 12:29:00 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-12-09 12:29:00 (GMT) |
commit | 3c3dbf89524b84bbbcc1799dec52b81bb11dfcca (patch) | |
tree | 715aa4226aa0c8c9a5b5d6f807be71cd2717bf4f /src/declarative/qml/qdeclarativeengine.cpp | |
parent | 91577a693d1bc3a123ee1f4c6e73b8a49be03aef (diff) | |
parent | 1e33b4ea1374b499bf938bc2f370f12404b76a58 (diff) | |
download | Qt-3c3dbf89524b84bbbcc1799dec52b81bb11dfcca.zip Qt-3c3dbf89524b84bbbcc1799dec52b81bb11dfcca.tar.gz Qt-3c3dbf89524b84bbbcc1799dec52b81bb11dfcca.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml:
Update QtGui bwins def file for QTBUG-15615
highlightFollowsCurrentItem: false was not always honored
ListView: Fix calculation of currentItem position when out of view.
Update QtGui def files
Fix openDatabaseSync() to not create unused directory
Document support for QVariantList and QVariantMap type conversion
Some doc clarification for components and javascript integration
Cursor shouldn't blink while dragging cursor position
Qt.include() docs weren't being picked up by qdoc
Doc: make it clear that "z" affects sibling stacking order.
Diffstat (limited to 'src/declarative/qml/qdeclarativeengine.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativeengine.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index a8404f0..201e675 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -261,6 +261,33 @@ of their use. \endlist */ +/*! +\qmlmethod object Qt::include(string url, jsobject callback) + +Includes another JavaScript file. This method can only be used from within JavaScript files, +and not regular QML files. + +This imports all functions from \a url into the current script's namespace. + +Qt.include() returns an object that describes the status of the operation. The object has +a single property, \c {status}, that is set to one of the following values: + +\table +\header \o Symbol \o Value \o Description +\row \o result.OK \o 0 \o The include completed successfully. +\row \o result.LOADING \o 1 \o Data is being loaded from the network. +\row \o result.NETWORK_ERROR \o 2 \o A network error occurred while fetching the url. +\row \o result.EXCEPTION \o 3 \o A JavaScript exception occurred while executing the included code. +An additional \c exception property will be set in this case. +\endtable + +The \c status property will be updated as the operation progresses. + +If provided, \a callback is invoked when the operation completes. The callback is passed +the same object as is returned from the Qt.include() call. +*/ +// Qt.include() is implemented in qdeclarativeinclude.cpp + QDeclarativeEnginePrivate::QDeclarativeEnginePrivate(QDeclarativeEngine *e) : captureProperties(false), rootContext(0), isDebugging(false), |